This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: generalize AIX cabs fix regex
- To: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: generalize AIX cabs fix regex
- From: Bruce Korb <bkorb at sco dot COM>
- Date: Fri, 29 Sep 2000 08:08:57 -0700
- CC: bkorb at gnu dot org, gcc-patches at gcc dot gnu dot org
- Organization: The Santa Cruz Operation
- References: <200009290111.VAA23796@mal-ach.watson.ibm.com>
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. */";