diff options
author | Richard Stallman <rms@gnu.org> | 1993-07-14 23:15:19 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-07-14 23:15:19 +0000 |
commit | c87e58bb18a2f3a734f0b351cd785ce7816d99e7 (patch) | |
tree | be0a0703ca01979300aea9655b401a30c6c58531 /gcc | |
parent | 3f729fda8586b1e602f632078fc7595a532975e7 (diff) | |
download | gcc-c87e58bb18a2f3a734f0b351cd785ce7816d99e7.zip gcc-c87e58bb18a2f3a734f0b351cd785ce7816d99e7.tar.gz gcc-c87e58bb18a2f3a734f0b351cd785ce7816d99e7.tar.bz2 |
(file): Fix size_t definition in stdlib.h as in types.h.
Also a conditional to prevent repeated definition.
From-SVN: r4919
Diffstat (limited to 'gcc')
-rwxr-xr-x | gcc/fixincludes | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes index ac031c4..42cf6dc 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -290,8 +290,8 @@ while [ $# != 0 ]; do /#define.BSD43__IO/ s/'\''\([cgx]\)'\''/\1/g /[^A-Z0-9_]CTRL[ ]*(/ s/\([^'\'']\))/'\''\1'\'')/ /[^A-Z0-9]_CTRL[ ]*(/ s/\([^'\'']\))/'\''\1'\'')/ - /#define.CTRL/ s/'\''\([cgx]\)'\''/\1/g - /#define._CTRL/ s/'\''\([cgx]\)'\''/\1/g + /#define[ ]*[ ]CTRL/ s/'\''\([cgx]\)'\''/\1/g + /#define[ ]*[ ]_CTRL/ s/'\''\([cgx]\)'\''/\1/g /#define.BSD43_CTRL/ s/'\''\([cgx]\)'\''/\1/g /#[el]*if/{ s/[a-zA-Z0-9_][a-zA-Z0-9_]*/ & /g @@ -330,7 +330,7 @@ done cd ${INPUT} # Install the proper definition of size_t in header files that it comes from. -for file in sys/types.h sys/stdtypes.h; +for file in sys/types.h stdlib.h sys/stdtypes.h; do if [ -r $file ] && [ ! -r ${LIB}/$file ]; then cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" @@ -657,6 +657,7 @@ if [ -r ${LIB}/$file ]; then fi # Fix return type of exit and abort in <stdlib.h> on SunOS 4.1. +# Also wrap protection around size_t for m88k-sysv3 systems. file=stdlib.h if [ -r $file ] && [ ! -r ${LIB}/$file ]; then cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file" @@ -671,7 +672,13 @@ if [ -r ${LIB}/$file ]; then -e 's/char \* calloc/void \* calloc/g' \ -e 's/char \* malloc/void \* malloc/g' \ -e 's/char \* realloc/void \* realloc/g' \ - -e 's/int exit/void exit/g' ${LIB}/$file > ${LIB}/${file}.sed + -e 's/int exit/void exit/g' \ + -e '/[ ]size_t[ ]*;/i\ +#ifndef _GCC_SIZE_T\ +#define _GCC_SIZE_T' \ + -e '/[ ]size_t[ ]*;/a\ +#endif' \ + ${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 |