This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

inclhack.def fixes for OSR5


This patch is a starting point to get OpenServer fast-fixincluded.
I think these are very low risk on other OSes.    The first hunk might
actually help some other OSes.


Mon Apr 26 23:07:03 1999  Robert Lipe  <robertlipe@usa.net>
	* inclhack.def (avoid_bool): Enable match if typedefs are 
	prepended by spaces.
	(sco5_stat_wrappers): New fix.   Make sys/stat.h C++ safe.


Index: inclhack.def
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/fixinc/inclhack.def,v
retrieving revision 1.10
diff -u -p -r1.10 inclhack.def
--- inclhack.def	1999/04/12 07:11:19	1.10
+++ inclhack.def	1999/04/27 04:06:30
@@ -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";
 };
 
 
@@ -764,6 +770,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";
+};
+
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]