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
This commit is contained in:
Rainer Orth 1998-12-17 18:22:30 +00:00 committed by Richard Henderson
parent fc03edb313
commit 21f891de68
2 changed files with 35 additions and 0 deletions

View File

@ -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

View File

@ -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