summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-03-05 00:24:01 +0000
committerJeff Law <law@gcc.gnu.org>1999-03-04 17:24:01 -0700
commitd743b12d654541d01fcd9da7d6df5007d49c1bb2 (patch)
tree52827ffbbdcfffb5b58885db33e122b1fdd3c22a
parentc20caf10fa581bef4cd96ad5dc74b815ab24c7c8 (diff)
downloadgcc-d743b12d654541d01fcd9da7d6df5007d49c1bb2.tar.gz
fixincludes (c_asm.h): Wrap Digital UNIX V4.0B DEC C specific asm() etc.
Thu Dec 17 18:21:49 1998 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> * fixincludes (c_asm.h): Wrap Digital UNIX V4.0B DEC C specific asm() etc. function declarations in __DECC. From-SVN: r25591
-rw-r--r--gcc/ChangeLog6
-rwxr-xr-xgcc/fixincludes30
2 files changed, 36 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5827e794cdb..f2a975d4cf8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Fri Mar 5 01:19:22 1999 Jeffrey A Law (law@cygnus.com)
+
+ Thu Dec 17 18:21:49 1998 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+ * fixincludes (c_asm.h): Wrap Digital UNIX V4.0B DEC C specific
+ asm() etc. function declarations in __DECC.
+
Wed Mar 3 23:55:14 1999 Zack Weinberg <zack@rabi.columbia.edu>
* cpp.in: New. Better cpp shell script.
diff --git a/gcc/fixincludes b/gcc/fixincludes
index f02bdd334d3..09e10bbed54 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -2537,6 +2537,36 @@ if [ -r ${LIB}/$file ]; then
fi
fi
+# Fix <c_asm.h> on Digital UNIX V4.0:
+# It contains a prototype for a DEC C internal asm() function, clashing with
+# gcc's asm keyword. So protect this with __DECC.
+file=c_asm.h
+if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
+ cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
+ chmod +w ${LIB}/$file 2>/dev/null
+ chmod a+r ${LIB}/$file 2>/dev/null
+fi
+
+if [ -r ${LIB}/$file ]; then
+ echo Fixing $file
+ sed -e '/^[ ]*float[ ]*fasm/i\
+#ifdef __DECC
+' \
+ -e '/^[ ]*#[ ]*pragma[ ]*intrinsic([ ]*dasm/a\
+#endif
+' ${LIB}/$file > ${LIB}/${file}.sed
+ rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
+ if cmp $file ${LIB}/$file >/dev/null 2>&1; then
+ rm ${LIB}/$file
+ else
+ # Find any include directives that use "file".
+ for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${LIB}/$file | sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`; do
+ dir=`echo $file | sed -e s'|/[^/]*$||'`
+ required="$required ${INPUT} $dir/$include ${LIB}/$dir/$include"
+ done
+ fi
+fi
+
# This file on SunOS 4 has a very large macro. When the sed loop
# tries pull it in, it overflows the pattern space size of the SunOS
# sed (GNU sed does not have this problem). Since the file does not