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]

fixinc vs "typedef int bool"



On aix4.2 curses.h has a bool typedef that looks like

typedef int bool;

fixinc only looks for "char" or "unsigned char".  Opps.

This bug causes libg++ to fail to build on aix4.2.

The attached patch should fix the problem.

	* fixinc/inclhack.def (avoid_bool): Also catch
	"typedef [unsigned] int bool".
	* fixinc/inclhack.sh, fixinc/fixincl.x, fixinc/fixincl.sh: Rebuilt.

Index: inclhack.def
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/fixinc/inclhack.def,v
retrieving revision 1.14.4.3
diff -c -3 -p -r1.14.4.3 inclhack.def
*** inclhack.def	1999/06/07 20:34:55	1.14.4.3
--- inclhack.def	1999/06/08 07:06:47
*************** fix = {
*** 136,141 ****
--- 136,153 ----
  
      sed = "/^[ ]*typedef[ \t][ \t]*unsigned char[ \t][ \t]*bool[ \t]*;/a\\\n"
                  "#endif\n";
+ 
+     sed = "/^typedef[ \t][ \t]*int[ \t][ \t]*bool[ \t]*;/i\\\n"
+                 "#ifndef __cplusplus\n";
+ 
+     sed = "/^typedef[ \t][ \t]*int[ \t][ \t]*bool[ \t]*;/a\\\n"
+                 "#endif\n";
+ 
+     sed = "/^[ ]*typedef[ \t][ \t]*unsigned int[ \t][ \t]*bool[ \t]*;/i\\\n"
+                 "#ifndef __cplusplus\n";
+ 
+     sed = "/^[ ]*typedef[ \t][ \t]*unsigned int[ \t][ \t]*bool[ \t]*;/a\\\n"
+                 "#endif\n";
  };
  
  



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