Teach wrc to look for system headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes bug #47 (http://bugs.winehq.com/show_bug.cgi?id=47),
as well as problems when porting apps to Winelib.

ChangeLog
  wrc should be aware of the location of the system headers.

Index: tools/wrc/Makefile.in
===================================================================
RCS file: /var/cvs/wine/tools/wrc/Makefile.in,v
retrieving revision 1.21
diff -u -r1.21 Makefile.in
--- tools/wrc/Makefile.in	10 Aug 2002 00:03:08 -0000	1.21
+++ tools/wrc/Makefile.in	10 Dec 2002 15:09:05 -0000
@@ -1,4 +1,4 @@
-DEFS      = -D__WINE__
+DEFS      = -D__WINE__ -DINCLUDEDIR="\"$(includedir)\""
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
--- tools/wrc/wrc.c.A0	2002-12-10 10:14:57.000000000 -0500
+++ tools/wrc/wrc.c	2002-12-10 11:54:14.000000000 -0500
@@ -73,6 +73,10 @@
 #include "parser.h"
 #include "../wpp/wpp.h"
 
+#ifndef INCLUDEDIR
+#define INCLUDEDIR "/usr/local/include/wine"
+#endif
+
 static char usage[] =
 	"Usage: wrc [options...] [infile[.rc|.res]] [outfile]\n"
 	"   -a n        Alignment of resource (win16 only, default is 4)\n"
@@ -98,6 +102,7 @@
 	"   -H file     Same as -h but written to file\n"
 	"   -i file	The name of the input file.\n"
 	"   -I path     Set include search dir to path (multiple -I allowed)\n"
+	"   -J		Do not search the standard include path\n"
 	"   -l lan      Set default language to lan (default is neutral {0, 0})\n"
 	"   -L          Leave case of embedded filenames as is\n"
 	"   -m          Do not remap numerical resource IDs\n"
@@ -119,6 +124,7 @@
 	"   --target		Synonym for -F.\n"
 	"   --format		Synonym for -O.\n"
 	"   --include-dir	Synonym for -I.\n"
+	"   --nostdinc		Synonym for -J.\n"
 	"   --define		Synonym for -D.\n"
 	"   --language		Synonym for -l.\n"
 	"   --preprocessor	Specify the preprocessor to use, including arguments.\n"
@@ -292,6 +298,7 @@
 	{ "target", 1, 0, 'F' },
 	{ "format", 1, 0, 'O' },
 	{ "include-dir", 1, 0, 'I' },
+	{ "nostdinc", 0, 0, 'J' },
 	{ "define", 1, 0, 'D' },
 	{ "language", 1, 0, 'l' },
 	{ "preprocessor", 1, 0, 1 },
@@ -305,6 +312,7 @@
 	extern char* optarg;
 	extern int   optind;
 	int optc, opti = 0;
+	int stdinc = 1;
 	int lose = 0;
 	int ret;
 	int a;
@@ -408,6 +416,9 @@
 		case 'I':
 			wpp_add_include_path(optarg);
 			break;
+		case 'J':
+			stdinc = 0;
+			break;
 		case 'l':
 			{
 				int lan;
@@ -480,6 +491,14 @@
 		return 1;
 	}
 
+	/* If we do need to search standard includes, add the to the path */
+	if (stdinc)
+	{
+		wpp_add_include_path(INCLUDEDIR);
+		wpp_add_include_path(INCLUDEDIR"/msvcrt");
+		wpp_add_include_path(INCLUDEDIR"/windows");
+	}
+	
 	/* Check for input file on command-line */
 	if(optind < argc)
 	{


-- 
Dimi.



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux