diff options
author | Richard Stallman <rms@gnu.org> | 1993-02-21 00:14:46 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-02-21 00:14:46 +0000 |
commit | 8befb9549a642b5e4f5947150957b9e8bf85d290 (patch) | |
tree | 55dd68d7b2b6ca5cf625b3c64a963bfa23a5c314 /gcc | |
parent | 27a5574b53cc2416b91985c85d746c9f49616b76 (diff) | |
download | gcc-8befb9549a642b5e4f5947150957b9e8bf85d290.zip gcc-8befb9549a642b5e4f5947150957b9e8bf85d290.tar.gz gcc-8befb9549a642b5e4f5947150957b9e8bf85d290.tar.bz2 |
(SRCDIR): Make absolute from ORIGDIR.
(sys/types.h): Quote variables that might expand with spaces.
Strip quotes from expansion of SIZE_TYPE.
Also fix incorrect installation of previous patch.
From-SVN: r3503
Diffstat (limited to 'gcc')
-rwxr-xr-x | gcc/fixincludes | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes index 6bff97d..267142a 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -44,6 +44,16 @@ case $LIB in ;; esac +# Make SRCDIR absolute only if needed to avoid problems with the amd. +cd $ORIGDIR +case $SRCDIR in +/*) + ;; +*) + cd $SRCDIR; SRCDIR=`${PWDCMD}` + ;; +esac + # Fail if no arg to specify a directory for the output. if [ x$1 = x ] then echo fixincludes: no output directory specified @@ -301,7 +311,7 @@ gobblegobble SIZE_TYPE" > ${LIB}/types.c foo=`cc -E -I${ORIGDIR} -I${SRCDIR} -I${SRCDIR}/config ${LIB}/types.c | grep gobblegobble | sed -e "s/gobblegobble[ ]*//"` rm -f ${LIB}/types.c # Default to our preferred type. - if [ $foo = SIZE_TYPE ]; then foo="unsigned long int"; else true; fi + if [ "$foo" = SIZE_TYPE ]; then foo="unsigned long int"; else foo=`echo $foo | sed -e 's/^.*"\(.*\)".*$/\1/'`; fi sed -e "s/typedef[ a-z_]*[ ]size_t/typedef $foo size_t/" ${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 @@ -827,7 +837,6 @@ if [ -r $file ] && [ ! -r ${LIB}/$file ]; then chmod +w ${LIB}/$file 2>/dev/null chmod a+r ${LIB}/$file 2>/dev/null fi - -e 's@ va_list)@ __gnuc_va_list)@' \ if [ -r ${LIB}/$file ]; then echo Fixing $file, non-const arg @@ -882,6 +891,7 @@ if [ -r ${LIB}/$file ]; then # Define __va_list__ (something harmless and unused) instead of va_list. # Don't claim to have defined va_list. sed -e 's@ va_list @ __gnuc_va_list @' \ + -e 's@ va_list)@ __gnuc_va_list)@' \ -e 's@ _VA_LIST_));@ __gnuc_va_list));@' \ -e 's@ va_list@ __va_list__@' \ -e 's@\*va_list@*__va_list__@' \ |