diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1992-12-10 14:53:23 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1992-12-10 14:53:23 -0800 |
commit | 2cdb7dfebe1bc534536716add32bf794933f8492 (patch) | |
tree | 660b5aac70f6d4410087b1dbc69389cacb050ee5 /gcc/fixinc.svr4 | |
parent | 2d3c34adf21047f68bc4cd6a2099a40d95ccf2ae (diff) | |
download | gcc-2cdb7dfebe1bc534536716add32bf794933f8492.zip gcc-2cdb7dfebe1bc534536716add32bf794933f8492.tar.gz gcc-2cdb7dfebe1bc534536716add32bf794933f8492.tar.bz2 |
(limits.h): Add #ifndef/#endif around macros that
are supposed to be defined in float.h.
From-SVN: r2859
Diffstat (limited to 'gcc/fixinc.svr4')
-rwxr-xr-x | gcc/fixinc.svr4 | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/gcc/fixinc.svr4 b/gcc/fixinc.svr4 index b96b3de..3d5c44e 100755 --- a/gcc/fixinc.svr4 +++ b/gcc/fixinc.svr4 @@ -1090,6 +1090,57 @@ if [ -x /bin/sony ]; then fi fi +# In limits.h, put #ifndefs around things that are supposed to be defined +# in float.h to avoid redefinition errors if float.h is included first. +# Solaris 2.1 has this problem. + +file=limits.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 '/[ ]FLT_MIN[ ]/i\ +#ifndef FLT_MIN'\ + -e '/[ ]FLT_MIN[ ]/a\ +#endif'\ + -e '/[ ]FLT_MAX[ ]/i\ +#ifndef FLT_MAX'\ + -e '/[ ]FLT_MAX[ ]/a\ +#endif'\ + -e '/[ ]FLT_DIG[ ]/i\ +#ifndef FLT_DIG'\ + -e '/[ ]FLT_DIG[ ]/a\ +#endif'\ + -e '/[ ]DBL_MIN[ ]/i\ +#ifndef DBL_MIN'\ + -e '/[ ]DBL_MIN[ ]/a\ +#endif'\ + -e '/[ ]DBL_MAX[ ]/i\ +#ifndef DBL_MAX'\ + -e '/[ ]DBL_MAX[ ]/a\ +#endif'\ + -e '/[ ]DBL_DIG[ ]/i\ +#ifndef DBL_DIG'\ + -e '/[ ]DBL_DIG[ ]/a\ +#endif' $file_to_fix > /tmp/$base + if cmp $file_to_fix /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 + echo 'Removing unneeded directories:' cd $LIB files=`find . -type d -print | sort -r` |