This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[CVS 980416]: PATCH for bug in fix-header.c
- To: egcs-bugs at cygnus dot com
- Subject: [CVS 980416]: PATCH for bug in fix-header.c
- From: Manfred Hollstein <manfred at s-direktnet dot de>
- Date: Thu, 16 Apr 1998 18:38:50 +0200 (MET DST)
- Reply-To: Manfred Hollstein <manfred at s-direktnet dot de>, Manfred dot Hollstein at ks dot sel dot alcatel dot de
If fixproto generates a formerly missing "stdlib.h" include file, the
produced "#ifndef ... #define ... #endif ..." bracket conflicts with
fix-header.c. This patch fixes it. It is safe to #undef these values
here, because no #include follows.
Thu Apr 16 18:30:17 1998 Manfred Hollstein <manfred@s-direktnet.de>
* fix-header.c (enum special_file): Undefine enumerators if they
are already defined by to include files.
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-980416.orig/gcc/fix-header.c egcs-980416/gcc/fix-header.c
--- egcs-980416.orig/gcc/fix-header.c Wed Apr 8 14:33:48 1998
+++ egcs-980416/gcc/fix-header.c Thu Apr 16 18:28:12 1998
@@ -127,9 +127,21 @@ char *inf_ptr;
enum special_file
{
no_special,
+#ifdef errno_h
+#undef errno_h
+#endif
errno_h,
+#ifdef stdio_h
+#undef stdio_h
+#endif
stdio_h,
+#ifdef stdlib_h
+#undef stdlib_h
+#endif
stdlib_h,
+#ifdef sys_stat_h
+#undef sys_stat_h
+#endif
sys_stat_h
};