summaryrefslogtreecommitdiff
path: root/gcc/fixinc.svr4
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1993-09-28 22:41:21 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1993-09-28 22:41:21 +0000
commit5c47b686a4c734f1ccd64dbcba6425d685d85891 (patch)
treed2ce572775c919e2e468e4a3a09f280cb1412911 /gcc/fixinc.svr4
parente437678f77f37d05acedb158cacc2739fd7f4d93 (diff)
downloadgcc-5c47b686a4c734f1ccd64dbcba6425d685d85891.tar.gz
(math.h): Put #ifndef around HUGE_VAL define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5509 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc.svr4')
-rwxr-xr-xgcc/fixinc.svr431
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/fixinc.svr4 b/gcc/fixinc.svr4
index 55049a96f3b..0f33bc21ad3 100755
--- a/gcc/fixinc.svr4
+++ b/gcc/fixinc.svr4
@@ -1320,6 +1320,37 @@ EOF
chmod a+r ${LIB}/$file
fi
+# In math.h, put #ifndefs around things that might be defined in a gcc
+# specific math-*.h file.
+
+file=math.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
+ sed -e '/define[ ]HUGE_VAL[ ]/i\
+#ifndef HUGE_VAL'\
+ -e '/define[ ]HUGE_VAL[ ]/a\
+#endif' $file_to_fix > /tmp/$base
+ if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \
+ true
+ else
+ echo Fixed $file_to_fix
+ rm -f ${LIB}/$file
+ cp /tmp/$base ${LIB}/$file
+ chmod a+r ${LIB}/$file
+ fi
+ rm -f /tmp/$base
+fi
+
echo 'Removing unneeded directories:'
cd $LIB
files=`find . -type d -print | sort -r`