diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 1994-06-23 17:48:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 1994-06-23 17:48:38 +0000 |
commit | 4e373a59306c46f308b9066287b9a6ccde97ffb0 (patch) | |
tree | 7750f86fc5480b704cef350e15e640914cd49a3d | |
parent | e2c671bad74170789f6f21f77da26dcdcce794dd (diff) | |
download | gcc-4e373a59306c46f308b9066287b9a6ccde97ffb0.zip gcc-4e373a59306c46f308b9066287b9a6ccde97ffb0.tar.gz gcc-4e373a59306c46f308b9066287b9a6ccde97ffb0.tar.bz2 |
Fix sbrk return type in <unistd.h> on Alpha OSF/1 V2.0.
From-SVN: r7538
-rwxr-xr-x | gcc/fixincludes | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes index d5762d7..4f4618f 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -1660,17 +1660,17 @@ if [ -r $file ] && [ ! -r ${LIB}/$file ]; then fi if [ -r ${LIB}/$file ]; then - if grep 'stderr' ${LIB}/$file >/dev/null ; then - if grep 'include.*stdio.h' ${LIB}/$file >/dev/null ; then + if grep 'stderr' ${LIB}/$file >/dev/null 2>/dev/null; then + if grep 'include.*stdio.h' ${LIB}/$file >/dev/null 2>/dev/null; then true else echo "Fixing $file (needs stdio.h)" echo '#include <stdio.h>' >>${LIB}/$file fi fi - if grep 'exit *(' ${LIB}/$file >/dev/null || - grep 'abort *(' ${LIB}/$file >/dev/null ; then - if grep 'include.*stdlib.h' ${LIB}/$file >/dev/null ; then + if grep 'exit *(' ${LIB}/$file >/dev/null 2>/dev/null || + grep 'abort *(' ${LIB}/$file >/dev/null 2>/dev/null; then + if grep 'include.*stdlib.h' ${LIB}/$file >/dev/null 2>/dev/null; then true else echo "Fixing $file (needs stdlib.h)" @@ -1682,6 +1682,24 @@ if [ -r ${LIB}/$file ]; then fi fi +# Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0 +file=unistd.h +if [ -r $file ] && [ ! -r ${LIB}/$file ]; then + cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" + chmod +w ${LIB}/$file 2>/dev/null + chmod a+r ${LIB}/$file 2>/dev/null +fi + +if [ -r ${LIB}/$file ]; then + echo Fixing $file, sbrk declaration + sed -e 's/char\([ ]*\*[ ]*sbrk[ ]*(\)/void\1/' \ + ${LIB}/$file > ${LIB}/${file}.sed + rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file + if cmp $file ${LIB}/$file >/dev/null 2>&1; then + rm -f ${LIB}/$file + fi +fi + # This file on SunOS 4 has a very large macro. When the sed loop # tries pull it in, it overflows the pattern space size of the SunOS # sed (GNU sed does not have this problem). Since the file does not |