This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Recent fixinc cabs addition breaks sunos4 + fix
- To: bkorb at sco dot COM
- Subject: Re: Recent fixinc cabs addition breaks sunos4 + fix
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Thu, 18 May 2000 11:51:45 -0400 (EDT)
- Cc: autogen at linuxbox dot com, egcs-bugs at egcs dot cygnus dot com, egcs-patches at egcs dot cygnus dot com
> From: Bruce Korb <bkorb@sco.COM>
>
> "Kaveh R. Ghazi" wrote:
> > I didn't have autogen handy but the following quick hack to the
> > generated file fixed it.
> >
> > --- ../../../../egcs-CVS20000508/gcc/fixinc/fixincl.x Mon May 8 21:18:37 2000
> > +++ fixincl.x Tue May 9 13:49:25 2000
> > @@ -1292,8 +1292,8 @@ tTestDesc aBroken_CabsTests[] = {
> > * Fix Command Arguments for Broken_Cabs
> > */
> > const char* apzBroken_CabsPatch[] = { "sed",
> > - "-e", "/^extern double cabs();/d",
> > - "-e", "/^extern double cabs(struct dbl_hypot);/d",
> > + "-e", "s/^extern double cabs();//",
> > + "-e", "s/^extern double cabs(struct dbl_hypot);//",
> > (char*)NULL };
> >
> > /* * * * * * * * * * * * * * * * * * * * * * * * * *
> >
>
> [...]
> And, yes, if you have a moment, please apply this to
> the inclhack.def and augment the test_text with the
> problem that triggered this, please :).
> Thanks!
> Bruce
Okay I installed the following patch and regenerated fixincl.x.
I'm not sure whether I need to update anything else when adding
test_text (e.g. check.diff.) It looks like I should simply move the
NEWDIFF file to check.diff, but the current differences between
NEWDIFF and check.diff include more than my cabs stuff so I left it
alone.
What's the proper procedure?
Thanks,
--Kaveh
2000-05-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* fixinc/inclhack.def (broken_cabs): Update fix to handle comments
following the cabs decl and terminating on the following line.
Add the corresponding test_text case.
diff -rup orig/egcs-CVS20000517/gcc/fixinc/inclhack.def egcs-CVS20000517/gcc/fixinc/inclhack.def
--- orig/egcs-CVS20000517/gcc/fixinc/inclhack.def Wed May 17 11:00:23 2000
+++ egcs-CVS20000517/gcc/fixinc/inclhack.def Thu May 18 11:07:11 2000
@@ -781,18 +781,22 @@ fix = {
/*
* Remove `extern double cabs' declarations from math.h.
* This conflicts with C9x. Discovered on AIX.
+ * SunOS4 has its cabs() declaration followed by a comment which
+ * terminates on the following line.
*/
fix = {
hackname = broken_cabs;
files = "math.h";
select = '^extern double cabs';
- sed = '/^extern double cabs();/d';
- sed = '/^extern double cabs(struct dbl_hypot);/d';
+ sed = 's/^extern double cabs();//';
+ sed = 's/^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";
+ "#endif\n"
+ "extern double cabs(); /* This is a comment\n"
+ " and it ends here. */";
};