This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] update prototize.c to match CPP's include handling
- From: "David O'Brien" <obrien at FreeBSD dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 Mar 2002 11:52:44 -0800
- Subject: [PATCH] update prototize.c to match CPP's include handling
- Organization: The NUXI BSD group
- Reply-to: obrien at FreeBSD dot org
W/o this patch protoize will not build in some environments because it
assumes too many include directives are defined.
2002-03-29 David O'Brien <obrien@FreeBSD.org>
* protoize.c: Match include directory usage with cppdefault.c.
Index: protoize.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/protoize.c,v
retrieving revision 1.72
diff -u -r1.72 protoize.c
--- protoize.c 2002/01/22 14:33:32 1.72
+++ protoize.c 2002/03/29 19:49:53
@@ -197,14 +197,6 @@
/* Make a table of default system include directories
just as it is done in cpp. */
-#ifndef STANDARD_INCLUDE_DIR
-#define STANDARD_INCLUDE_DIR "/usr/include"
-#endif
-
-#ifndef LOCAL_INCLUDE_DIR
-#define LOCAL_INCLUDE_DIR "/usr/local/include"
-#endif
-
static const struct default_include { const char *const fname;
const char *const component;
const int x1, x2; } include_defaults[]
@@ -215,29 +207,43 @@
/* Pick up GNU C++ specific include files. */
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },
#ifdef CROSS_COMPILE
+#ifdef GCC_INCLUDE_DIR
/* This is the dir for fixincludes. Put it just before
the files that we fix. */
{ GCC_INCLUDE_DIR, "GCC", 0, 0 },
+#endif
+#ifdef CROSS_INCLUDE_DIR
/* For cross-compilation, this dir name is generated
automatically in Makefile.in. */
{ CROSS_INCLUDE_DIR, 0, 0, 0 },
+#endif
+#ifdef TOOL_INCLUDE_DIR
/* This is another place that the target system's headers might be. */
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 0 },
+#endif
#else /* not CROSS_COMPILE */
+#ifdef LOCAL_INCLUDE_DIR
/* This should be /use/local/include and should come before
the fixincludes-fixed header files. */
{ LOCAL_INCLUDE_DIR, 0, 0, 1 },
+#endif
+#ifdef TOOL_INCLUDE_DIR
/* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here.
Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 0 },
+#endif
+#ifdef GCC_INCLUDE_DIR
/* This is the dir for fixincludes. Put it just before
the files that we fix. */
{ GCC_INCLUDE_DIR, "GCC", 0, 0 },
+#endif
/* Some systems have an extra dir of include files. */
#ifdef SYSTEM_INCLUDE_DIR
{ SYSTEM_INCLUDE_DIR, 0, 0, 0 },
#endif
+#ifdef STANDARD_INCLUDE_DIR
{ STANDARD_INCLUDE_DIR, 0, 0, 0},
+#endif
#endif /* not CROSS_COMPILE */
{ 0, 0, 0, 0}
};