From 21f891de68340f3798fb681e4c3e6d94a81c0390 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 17 Dec 1998 18:22:30 +0000 Subject: [PATCH] Rainer Orth Rainer Orth * fixincludes (c_asm.h): Wrap Digital UNIX V4.0B DEC C specific asm() etc. function declarations in __DECC. From-SVN: r24366 --- gcc/ChangeLog | 5 +++++ gcc/fixincludes | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c6a39842b41..14683c5e525 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Dec 17 18:21:49 1998 Rainer Orth + + * 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 * expr.c (emit_move_insn_1): Only emit a clobber if the target 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 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 -- 2.30.2