diff options
author | Jeff Law <law@gcc.gnu.org> | 1997-11-02 14:19:36 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-11-02 14:19:36 -0700 |
commit | e9a25f70a0a7b82881b56cb3dfa7422b2968682a (patch) | |
tree | 46fe768360493f03f7282d07762e7b26c292aabd /gcc/fixincludes | |
parent | bb84e66919817020267815eed4304e543688e722 (diff) | |
download | gcc-e9a25f70a0a7b82881b56cb3dfa7422b2968682a.tar.gz |
Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-x | gcc/fixincludes | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes index 33ef8add15b..dfe50d592e2 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -2901,6 +2901,43 @@ for file in curses.h dbm.h locale.h stdio.h stdlib.h string.h time.h unistd.h sy fi done +# HPUX 10.x sys/param.h defines MAXINT which clashes with values.h +file=sys/param.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 '/[ ]MAXINT[ ]/i\ +#ifndef MAXINT +'\ + -e '/[ ]MAXINT[ ]/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 + # 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 + rm -f /tmp/$base +fi + + # This loop does not appear to do anything, because it uses file # rather than $file when setting target. It also appears to be # unnecessary, since the main loop processes symbolic links. @@ -2960,4 +2997,5 @@ for file in $files; do rmdir $LIB/$file > /dev/null 2>&1 done + exit 0 |