summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-18 15:47:31 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-18 15:47:31 +0000
commit420a80940f3d3669aafcaadfa72410a1deb11a2a (patch)
treedb3c7032ca3f11fc15c7245a63401a6861fc41a7
parent3b304865ca50dd941827ffe1a6f34e821529802c (diff)
downloadppe42-gcc-420a80940f3d3669aafcaadfa72410a1deb11a2a.tar.gz
ppe42-gcc-420a80940f3d3669aafcaadfa72410a1deb11a2a.zip
* fixinc/inclhack.def (broken_cabs): Update fix to handle comments
following the cabs decl which terminate on the following line. Add the corresponding test_text case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33983 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/fixinc/fixincl.x4
-rw-r--r--gcc/fixinc/inclhack.def10
3 files changed, 15 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dc6182aeaa8..1637585c78a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2000-05-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * fixinc/inclhack.def (broken_cabs): Update fix to handle comments
+ following the cabs decl which terminate on the following line.
+ Add the corresponding test_text case.
+
2000-05-18 Neil Booth <NeilB@earthling.net>
* cppinit.c (cpp_reader_init): Initialise col_adjust and
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index 48ebbddd0e2..f5bcac4e025 100644
--- a/gcc/fixinc/fixincl.x
+++ b/gcc/fixinc/fixincl.x
@@ -1300,8 +1300,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 };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index 97b7dcf159e..25f99f015da 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -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. */";
};
OpenPOWER on IntegriCloud