PATCH: Fix IRIX 6.5/Solaris 2 <complex.h> for GCC (PR libfortran/41169)
Ralf Wildenhues
Ralf.Wildenhues@gmx.de
Wed Sep 2 17:34:00 GMT 2009
Hello Rainer,
* Bruce Korb wrote on Wed, Sep 02, 2009 at 04:53:20PM CEST:
> On Wed, Sep 2, 2009 at 5:01 AM, Rainer Orth wrote:
> > --- inclhack.def     (revision 151177)
> > +++ inclhack.def     (working copy)
> > @@ -2446,6 +2446,29 @@
> > +   hackname  = solaris_complex;
> > +   mach    = "*-*-solaris2.*";
> > +   files   = complex.h;
> > +   select   = "#define[ \t]_Complex_I[ \t]_Complex_I";
> > +   sed        = "s/#define[ \t]_Complex_I[ \t]_Complex_I/"
> > + Â Â Â Â Â Â Â "#define\t_Complex_I\t\\(__extension__ 1.0iF\\)/";
Why are there backslashes before ( and ) in this line? That line is
part of the replacement text, so the backslashes will end up literally
in the output.
> > +   sed        = "/#define[ \t]_Imaginary_I[ \t]_Imaginary_I/d";
> > +   sed        = "/#define[ \t]imaginary[ \t]_Imaginary/d";
> > +   sed    = "s/#define[ \t]I[ \t]\\+_Imaginary_I/#define\tI\t\t_Complex_I/";
> > +   test_text = "#define    _Complex_I    _Complex_I\n"
> > +        "#define     complex     _Complex\n"
> > +        "#define     _Imaginary_I   _Imaginary_I\n"
> > +        "#define     imaginary    _Imaginary\n"
> > + Â Â Â Â Â Â Â "#undef I\n"
> > +        "#define     I        _Imaginary_I";
Thanks,
Ralf
More information about the Gcc-patches
mailing list