[fixinc patch] Add disabled hacks from old fixincludes 3/5
Nathanael Nerode
neroden@twcny.rr.com
Tue Aug 26 23:06:00 GMT 2003
This one is hard to test since I don't know anyone with a machine it
should trigger on. :-P But it at least sort of works, doing the
right thing with 'make check' when enabled.
Bruce, OK for mainline?
* fixinc/inclhack.def (ptx_pwd_h): New disabled fix, ported
from fixinc.ptx.
Index: inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.176
diff -u -r1.176 inclhack.def
--- inclhack.def 26 Aug 2003 22:55:39 -0000 1.176
+++ inclhack.def 26 Aug 2003 23:03:58 -0000
@@ -2002,6 +2002,30 @@
/*
+ * In pwd.h, PTX 1.x needs stdio.h included since FILE * was added in a
+ * prototype later on in the file. (It's not clear that this is
+ * still true, and even if it is, FILE * may be added after this fix runs by
+ * fixproto.)
+ */
+#ifdef PTX
+fix = {
+ hackname = ptx_pwd_h;
+ files = pwd.h;
+ select = 'FILE \*';
+ bypass = 'stdio.h';
+ sed = "/#include <sys\\/types\\.h/a\\\n"
+ "\\\n"
+ "#if defined(__STDC__) || defined(__cplusplus)\\\n"
+ "#include <stdio.h>\\\n"
+ "#endif /* __STDC__ */\\\n"
+ "\n";
+ test_text = "#include <sys/types.h>\n"
+ "void foo (FILE *)";
+};
+#endif
+
+
+/*
* On DYNIX/ptx, sys/mc_param.h has an embedded asm for the cpuid instruction
* on the P5. This is not used by anything else so we ifdef it out.
* Current GCC doesn't seem to complain about the asm, though.
--
Nathanael Nerode <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html
More information about the Gcc-patches
mailing list