From 5b6a946c3312328aa326f4c778bb2bb37feb71f4 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sat, 17 Oct 1992 21:21:32 +0000 Subject: [PATCH] (string.h): Remove #defines for other compiler's builtin functions. From-SVN: r2501 --- gcc/fixinc.svr4 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gcc/fixinc.svr4 b/gcc/fixinc.svr4 index 00375063020..8dcc8825929 100755 --- a/gcc/fixinc.svr4 +++ b/gcc/fixinc.svr4 @@ -500,6 +500,39 @@ EOF rm -f /tmp/$base fi +# Disable apparent native compiler optimization cruft in SVR4.2 +# that is visible to any ANSI compiler using this include. Simply +# delete the lines the #define some string functions to internal forms. + +file=string.h +base=`basename $file` +if [ -r ${LIB}/$file ]; then + file_to_fix=${LIB}/$file +else + if [ -r ${INPUT}/$file ]; then + file_to_fix=${INPUT}/$file + else + file_to_fix="" + fi +fi +if [ \! -z "$file_to_fix" ]; then + echo Checking $file_to_fix + cp $file_to_fix /tmp/$base + chmod +w /tmp/$base + ex /tmp/$base </dev/null 2>&1; then \ + echo No change needed in $file_to_fix + else + echo Fixed $file_to_fix + rm -f ${LIB}/$file + cp /tmp/$base ${LIB}/$file + fi + rm -f /tmp/$base +fi + # Add a #define of _SIGACTION_ into . # Also fix types of SIG_DFL, SIG_ERR, SIG_IGN, and SIG_HOLD. -- 2.30.2