From: Kaveh R. Ghazi Date: Fri, 9 Jun 2000 14:42:09 +0000 (+0000) Subject: * scan-types.sh (VALUE) Wrap use with double quotes to protect X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c8c1c46b1683d61e791167b23b1eec31b872efa;p=gcc.git * scan-types.sh (VALUE) Wrap use with double quotes to protect variable against filename expansion when it contains "char *". From-SVN: r34468 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f6a6c202e5a..4794c4253c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2000-06-09 Kaveh R. Ghazi + * scan-types.sh (VALUE) Wrap use with double quotes to protect + variable against filename expansion when it contains "char *". + * system.h (SSIZE_MAX): Delete backup definition. * cppfiles.c (read_include_file): Use INTTYPE_MAXIMUM(ssize_t) diff --git a/gcc/scan-types.sh b/gcc/scan-types.sh index a7fa2384979..59d786a9fd0 100755 --- a/gcc/scan-types.sh +++ b/gcc/scan-types.sh @@ -51,7 +51,10 @@ for TYPE in dev_t clock_t fpos_t gid_t ino_t mode_t nlink_t off_t pid_t size_t s eval "VALUE='`${SED} -e 's| *$||' -e '2,$d' /dev/null ; then true + # Ensure $VALUE is double quoted to protect cases where it + # contains an asterisk and would cause filename expansion. + # E.g. when va_list is "char *". + if echo "$VALUE" | grep " " >/dev/null ; then true else rm -f TMP ${SED} -n -e "s|.*typedef[ ][ ]*\(.*[^a-zA-Z0-9_]\)${VALUE}[ ]*;.*|\1|w TMP" /dev/null