diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-02-21 00:14:46 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1993-02-21 00:14:46 +0000 |
commit | 46742ba1143512475314758d79438696299707c2 (patch) | |
tree | 55dd68d7b2b6ca5cf625b3c64a963bfa23a5c314 /gcc/fixincludes | |
parent | 565a492a3f939787835491e3ccfa58edf7a74101 (diff) | |
download | ppe42-gcc-46742ba1143512475314758d79438696299707c2.tar.gz ppe42-gcc-46742ba1143512475314758d79438696299707c2.zip |
(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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3503 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixincludes')
-rwxr-xr-x | gcc/fixincludes | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/fixincludes b/gcc/fixincludes index 6bff97dc6ef..267142a11a4 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__@' \ |