generalize AIX cabs fix regex
Bruce Korb
bkorb@sco.COM
Fri Sep 29 08:23:00 GMT 2000
David Edelsohn wrote:
>
> The formatting of the AIX math.h file has changed slightly. This
> patch generalizes the regex slightly so that it finds the new variant.
It finds the file with the new variant, but it will not apply because
the second fix arg still uses the old syntax. Try my variation below.
If *it* works, then apply that.
> Thanks, David
Thank you. :-)
> Index: inclhack.def
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/fixinc/inclhack.def,v
> retrieving revision 1.90
> diff -c -p -r1.90 inclhack.def
> *** inclhack.def 2000/08/23 14:08:57 1.90
> --- inclhack.def 2000/09/29 01:07:41
> *************** fix = {
> *** 883,898 ****
> fix = {
> hackname = broken_cabs;
> files = "math.h";
> ! select = '^extern double cabs';
>
> c_fix = format;
> c_fix_arg = "";
> c_fix_arg = "^extern double cabs\\((struct dbl_hypot|)\\);";
>
> test_text = "#ifdef __STDC__\n"
> ! "extern double cabs(struct dbl_hypot);\n"
> "#else\n"
> ! "extern double cabs();\n"
> "#endif\n"
> "extern double cabs(); /* This is a comment\n"
> " and it ends here. */";
> --- 883,898 ----
# fix = {
# hackname = broken_cabs;
# files = "math.h";
# ! select = '^extern[ \t]*double[ \t]*cabs';
#
# c_fix = format;
# c_fix_arg = "";
# c_fix_arg = "^extern double cabs\\((struct dbl_hypot|)\\);";
#
# test_text = "#ifdef __STDC__\n"
# ! "extern double cabs(struct dbl_hypot);\n"
# "#else\n"
# ! "extern double cabs();\n"
# "#endif\n"
# "extern double cabs(); /* This is a comment\n"
# " and it ends here. */";
===========================
> fix = {
> hackname = broken_cabs;
> files = "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|)\\);";
>
> test_text = "#ifdef __STDC__\n"
> ! "extern double cabs(struct dbl_hypot);\n"
> "#else\n"
> ! "extern double cabs();\n"
> "#endif\n"
> "extern double cabs(); /* This is a comment\n"
> " and it ends here. */";
More information about the Gcc-patches
mailing list