This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
inckhack.def patches for OSR5
- To: egcs-patches at egcs dot cygnus dot com
- Subject: inckhack.def patches for OSR5
- From: Robert Lipe <robertl at sco dot com>
- Date: Mon, 12 Apr 1999 23:57:09 -0500
Bruce has already proofread these and approved of them. It gets us a
few steps closer to enabling fast fixincludes on OpenServer.
If someone else could apply this, I'd appreciate it.
Thanx,
RJL
* inclhack.def (avoid_bool): Add match for unsigned char.
(sco5_stat_wrappers): New fix.
Index: inclhack.def
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/fixinc/inclhack.def,v
retrieving revision 1.9
diff -u -p -r1.9 inclhack.def
--- inclhack.def 1999/04/02 11:02:36 1.9
+++ inclhack.def 1999/04/13 04:52:46
@@ -129,6 +129,12 @@ fix = {
sed = "/^typedef[ \t][ \t]*char[ \t][ \t]*bool[ \t]*;/a\\\n"
"#endif\n";
+
+ sed = "/^[ ]*typedef[ \t][ \t]*unsigned char[ \t][ \t]*bool[ \t]*;/i\\\n"
+ "#ifndef __cplusplus\n";
+
+ sed = "/^[ ]*typedef[ \t][ \t]*unsigned char[ \t][ \t]*bool[ \t]*;/a\\\n"
+ "#endif\n";
};
@@ -762,6 +768,27 @@ fix = {
"#define hypot\tfake_hypot\n";
};
+/*
+ * On SCO OpenServer 5.0.0 through (at least) 5.0.5 <sys/stat.h> contains
+ * tiny static wrappers that aren't C++ safe.
+ */
+fix = {
+ hackname = sco5_stat_wrappers;
+ mach = "i*86-*-sco3.2v5*"
+ files = "sys/stat.h";
+
+ sed = "/^static int[ \t]*[a-z]*stat(/i\\\n"
+ "#ifdef __cplusplus\\\n"
+ "extern \"C\"\\\n"
+ "{\\\n"
+ "#endif\\\n";
+
+ sed = "/^}$/a\\\n"
+ "#ifdef __cplusplus\\\n"
+ "}\\\n"
+ "#endif \/* __cplusplus *\/\\\n";
+};
+
/*
* Fix incorrect S_IF* definitions on m88k-sysv3.