aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>1998-12-17 18:22:30 +0000
committerRichard Henderson <rth@gcc.gnu.org>1998-12-17 10:22:30 -0800
commit21f891de68340f3798fb681e4c3e6d94a81c0390 (patch)
treed5396c6f18fcb4a537d32d7df2908d77b3bf7cc9 /gcc
parentfc03edb313e93c6c1eab1cbe36536754b9a435f8 (diff)
downloadgcc-21f891de68340f3798fb681e4c3e6d94a81c0390.zip
gcc-21f891de68340f3798fb681e4c3e6d94a81c0390.tar.gz
gcc-21f891de68340f3798fb681e4c3e6d94a81c0390.tar.bz2
Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
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: r24366
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rwxr-xr-xgcc/fixincludes30
2 files changed, 35 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c6a3984..14683c5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
Thu Dec 17 13:57:23 1998 Nick Clifton <nickc@cygnus.com>
* expr.c (emit_move_insn_1): Only emit a clobber if the target
diff --git a/gcc/fixincludes b/gcc/fixincludes
index f02bdd3..09e10bb 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