Commit ce805568 by Richard Kenner

(stdio.h): Fix return type of fread and fwrite on sysV68.

From-SVN: r10777
parent c46722a7
...@@ -1234,6 +1234,31 @@ EOF ...@@ -1234,6 +1234,31 @@ EOF
fi fi
fi fi
# Fix return type of fread and fwrite on sysV68
file=stdio.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, fread and fwrite return type
sed -e 's/^\(extern int fclose(), fflush()\), \(fread(), fwrite()\)\(.*\)$/extern unsigned int \2;\
\1\3/' \
${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
# parameters not const on DECstation Ultrix V4.0 and OSF/1. # parameters not const on DECstation Ultrix V4.0 and OSF/1.
file=stdio.h file=stdio.h
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment