This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fixinc vs "typedef int bool"
- To: egcs-patches at egcs dot cygnus dot com
- Subject: fixinc vs "typedef int bool"
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 08 Jun 1999 01:07:20 -0600
- Reply-To: law at cygnus dot com
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";
};