[fixincludes patch] Make broken_cabs match more generously
Nathanael Nerode
neroden@twcny.rr.com
Fri Aug 1 22:02:00 GMT 2003
>Only one problem is that fixincl does not fix /usr/include/architecture/ppc where
> math.h really is stored.
Andrew, how about this? See, it's a simple enough change...
Bruce, I kept the change to the test_text cause we might as well test
all *three* variations, being different from each other and all...
* inclhack.def (broken_cabs): Make matching more generous.
* fixincl.x: Regenerate.
* tests/base/math.h: Regenerate to match test_text change.
Index: inclhack.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fixinc/inclhack.def,v
retrieving revision 1.169
diff -u -r1.169 inclhack.def
--- inclhack.def 31 Jul 2003 23:33:08 -0000 1.169
+++ inclhack.def 1 Aug 2003 22:00:27 -0000
@@ -783,21 +783,24 @@
* This conflicts with C99. Discovered on AIX.
* SunOS4 has its cabs() declaration followed by a comment which
* terminates on the following line.
+ * Darwin hides its broken cabs in an architecture-specific subdir.
*/
fix = {
hackname = broken_cabs;
- files = "math.h";
- select = '^extern[ \t]+double[ \t]+cabs';
+ files = "math.h";
+ files = "architecture/ppc/math.h";
+ select = '^extern[ \t]+double[ \t]+cabs';
c_fix = format;
c_fix_arg = "";
- c_fix_arg = "^extern[ \t]+double[ \t]+cabs\\((struct dbl_hypot|)\\);";
+ c_fix_arg = "^extern[ \t]+double[ \t]+cabs[ \t]*\\([^\\)]*\\);";
test_text = "#ifdef __STDC__\n"
"extern double cabs(struct dbl_hypot);\n"
"#else\n"
"extern double cabs();\n"
"#endif\n"
+ "extern double cabs ( _Complex z );\n"
"extern double cabs(); /* This is a comment\n"
" and it ends here. */";
};
--
Nathanael Nerode <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html
More information about the Gcc-patches
mailing list