diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-05-26 16:23:31 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-05-26 16:23:31 +0000 |
commit | 269d19b31483c5e9a657d38f0241e308ecc5e881 (patch) | |
tree | 178a2de63d69372ffd8c4f2d0a3851489e1ece3d /gcc/fixinc.svr4 | |
parent | 74b51eb9779d77f2c67023bb2d3130dcce77ed52 (diff) | |
download | gcc-269d19b31483c5e9a657d38f0241e308ecc5e881.tar.gz |
Protect __P in math.h and floatingpoint.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7350 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc.svr4')
-rwxr-xr-x | gcc/fixinc.svr4 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/fixinc.svr4 b/gcc/fixinc.svr4 index 869589286e8..7dbf671f962 100755 --- a/gcc/fixinc.svr4 +++ b/gcc/fixinc.svr4 @@ -1379,6 +1379,38 @@ if [ \! -z "$file_to_fix" ]; then rm -f /tmp/$base fi +# Solaris math.h and floatingpoint.h define __P without protection, +# which conflicts with the fixproto definition. The fixproto +# definition and the Solaris definition are used the same way. +for file in math.h floatingpoint.h; do + 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[ ]*__P/i\ +#ifndef __P'\ + -e '/^#define[ ]*__P/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 +done + echo 'Removing unneeded directories:' cd $LIB files=`find . -type d -print | sort -r` |