aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixincludes
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-11-05 11:05:35 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1995-11-05 11:05:35 -0500
commit9cd03bddfc5b9f9128888056685ace46ae408f22 (patch)
tree27cce5377084e2636d1eb615c0b85a9d332544ed /gcc/fixincludes
parent85e4d983f32f0001b2419b024fa8660dea2deac5 (diff)
downloadgcc-9cd03bddfc5b9f9128888056685ace46ae408f22.zip
gcc-9cd03bddfc5b9f9128888056685ace46ae408f22.tar.gz
gcc-9cd03bddfc5b9f9128888056685ace46ae408f22.tar.bz2
(malloc.h): Fix return type of {m,re}alloc.
From-SVN: r10557
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-xgcc/fixincludes3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes
index 6c2d157..333e6a3 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -932,6 +932,7 @@ if [ -r ${LIB}/$file ]; then
fi
# Fix return type of free and {c,m,re}alloc in <malloc.h> on SunOS 4.1.
+# Also fix return type of {m,re}alloc in <malloc.h> on sysV68
file=malloc.h
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
@@ -943,6 +944,8 @@ if [ -r ${LIB}/$file ]; then
echo Fixing $file
sed -e 's/typedef[ ]char \* malloc_t/typedef void \* malloc_t/g' \
-e 's/int[ ][ ]*free/void free/g' \
+ -e 's/char\([ ]*\*[ ]*malloc\)/void\1/g' \
+ -e 's/char\([ ]*\*[ ]*realloc\)/void\1/g' \
${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