generalize AIX cabs fix regex

David Edelsohn dje@watson.ibm.com
Thu Sep 28 18:11:00 GMT 2000


	The formatting of the AIX math.h file has changed slightly.  This
patch generalizes the regex slightly so that it finds the new variant.

	Okay to apply?

Thanks, David

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. */";


More information about the Gcc-patches mailing list