diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1995-01-25 15:17:02 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1995-01-25 15:17:02 -0800 |
commit | 7374f95a9bed221260d498a52cfd3750820f363d (patch) | |
tree | 627874f2b02e7fc3719fd86d1133cbdaed8666c5 /gcc | |
parent | fa2981d865a08fd388fad6480959a7a965f880ea (diff) | |
download | gcc-7374f95a9bed221260d498a52cfd3750820f363d.zip gcc-7374f95a9bed221260d498a52cfd3750820f363d.tar.gz gcc-7374f95a9bed221260d498a52cfd3750820f363d.tar.bz2 |
(strings.h): Fix return type of strlen.
From-SVN: r8823
Diffstat (limited to 'gcc')
-rwxr-xr-x | gcc/fixincludes | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes index 1f32b53..3abafc6 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -1826,6 +1826,30 @@ if [ -r ${LIB}/$file ]; then fi fi +# Correct the return type for strlen in strings.h in SunOS 4. +file=strings.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 + sed -e 's/int[ ]*strlen();/__SIZE_TYPE__ strlen();/' \ + ${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 + else + # 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 +fi + # Delete the '#define void int' line from curses.h on Lynx file=curses.h if [ -r $file ] && [ ! -r ${LIB}/$file ]; then |