Commit 93b8a7a8 by Nathanael Nerode

inclhack.def (broken_cabs): Make matching more generous.

	* fixinc/inclhack.def (broken_cabs): Make matching more generous.
	* fixinc/fixincl.x: Regenerate.
	* fixinc/tests/base/math.h: Regenerate to match test_text change.

From-SVN: r70076
parent f920765d
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* *
* DO NOT EDIT THIS FILE (fixincl.x) * DO NOT EDIT THIS FILE (fixincl.x)
* *
* It has been AutoGen-ed Thursday July 31, 2003 at 07:32:15 PM EDT * It has been AutoGen-ed Friday August 1, 2003 at 06:47:22 PM EDT
* From the definitions inclhack.def * From the definitions inclhack.def
* and the template file fixincl * and the template file fixincl
*/ */
/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Jul 31 19:32:15 EDT 2003 /* DO NOT CVS-MERGE THIS FILE, EITHER Fri Aug 1 18:47:22 EDT 2003
* *
* You must regenerate it. Use the ./genfixes script. * You must regenerate it. Use the ./genfixes script.
* *
...@@ -1270,7 +1270,7 @@ tSCC zBroken_CabsName[] = ...@@ -1270,7 +1270,7 @@ tSCC zBroken_CabsName[] =
* File name selection pattern * File name selection pattern
*/ */
tSCC zBroken_CabsList[] = tSCC zBroken_CabsList[] =
"|math.h|"; "|math.h|architecture/ppc/math.h|architecture/i386/math.h|";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
...@@ -1292,7 +1292,7 @@ static tTestDesc aBroken_CabsTests[] = { ...@@ -1292,7 +1292,7 @@ static tTestDesc aBroken_CabsTests[] = {
static const char* apzBroken_CabsPatch[] = { static const char* apzBroken_CabsPatch[] = {
"format", "format",
"", "",
"^extern[ \t]+double[ \t]+cabs\\((struct dbl_hypot|)\\);", "^extern[ \t]+double[ \t]+cabs[ \t]*\\([^\\)]*\\);",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
......
...@@ -783,21 +783,25 @@ fix = { ...@@ -783,21 +783,25 @@ fix = {
* This conflicts with C99. Discovered on AIX. * This conflicts with C99. Discovered on AIX.
* SunOS4 has its cabs() declaration followed by a comment which * SunOS4 has its cabs() declaration followed by a comment which
* terminates on the following line. * terminates on the following line.
* Darwin hides its broken cabs in architecture-specific subdirs.
*/ */
fix = { fix = {
hackname = broken_cabs; hackname = broken_cabs;
files = "math.h"; files = "math.h";
select = '^extern[ \t]+double[ \t]+cabs'; files = "architecture/ppc/math.h";
files = "architecture/i386/math.h";
select = '^extern[ \t]+double[ \t]+cabs';
c_fix = format; c_fix = format;
c_fix_arg = ""; 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" test_text = "#ifdef __STDC__\n"
"extern double cabs(struct dbl_hypot);\n" "extern double cabs(struct dbl_hypot);\n"
"#else\n" "#else\n"
"extern double cabs();\n" "extern double cabs();\n"
"#endif\n" "#endif\n"
"extern double cabs ( _Complex z );\n"
"extern double cabs(); /* This is a comment\n" "extern double cabs(); /* This is a comment\n"
" and it ends here. */"; " and it ends here. */";
}; };
......
...@@ -25,6 +25,7 @@ struct exception; ...@@ -25,6 +25,7 @@ struct exception;
#else #else
#endif #endif
/* This is a comment /* This is a comment
and it ends here. */ and it ends here. */
#endif /* BROKEN_CABS_CHECK */ #endif /* BROKEN_CABS_CHECK */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment