fixinclude patches for AIX 4.3.3

Geoff Keating geoffk@cygnus.com
Sun Aug 13 10:55:00 GMT 2000


This suppresses the warnings that cpp produces while including
<sys/machine.h> and <pthread.h> on AIX 4.3.3.

Bootstrapped & tested on powerpc-aix.

-- 
- Geoffrey Keating <geoffk@cygnus.com>

===File ~/patches/cygnus/rs6000-aixcppfixincl.patch=========
2000-08-13  Geoffrey Keating  <geoffk@cygnus.com>

	* fixinc/inclhack.def (aix_pthread): New fix.
	(aix_sysmachine): New fix.
	* fixinc/fixincl.x: Regenerate.

Index: gcc/fixinc/inclhack.def
===================================================================
RCS file: /cvs/gcc/egcs/gcc/fixinc/inclhack.def,v
retrieving revision 1.86
diff -u -p -r1.86 inclhack.def
--- inclhack.def	2000/07/27 13:28:59	1.86
+++ inclhack.def	2000/08/13 17:52:58
@@ -576,6 +576,35 @@ fix = {
 
 
 /*
+ *  pthread.h on AIX 4.3.3 tries to define a macro without whitspace
+ *  which violates a requirement of ISO C.
+ */
+fix = {
+    hackname  = aix_pthread;
+    files     = "pthread.h";
+    select    = "(#define [A-Za-z_0-9]+)(\\\\\n[^A-Za-z_0-9 \t\n(])";
+    c_fix     = format;
+    c_fix_arg = "%1 %2";
+    test_text = "#define PTHREAD_MUTEX_INITIALIZER\\\n{";
+};
+
+
+/*
+ *  sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline
+ *  in an otherwise harmless (and #ifed out) macro definition
+ */
+fix = {
+    hackname  = aix_sysmachine;
+    files     = sys/machine.h;
+    select    = "\\\\ +\n";
+    c_fix     = format;
+    c_fix_arg = "\\\n";
+    test_text = "#define FOO \\\n"
+    " bar \\ \n baz \\ \n bat";
+};
+
+
+/*
  *  sys/wait.h on AIX 3.2.5 puts the declaration of wait3 before the
  *  definition of struct rusage, so the prototype added by fixproto fails.
  */
============================================================


More information about the Gcc-patches mailing list