autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _AC_CACHE_DUMP simplified


From: Paul Eggert
Subject: Re: _AC_CACHE_DUMP simplified
Date: Tue, 04 Apr 2006 22:12:37 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden (Eric Blake) writes:

> case $as_nl`(ac_space=' '; set) 2>&1` in
> *${as_nl}ac_space=\ *)

Yes, that's better, thanks.

> This is still not robust to something in the environment such
> as 'ac_spac="${as_nl}ac_space= "',

Neither was the original, so that's not a regression.

> the probability of configuring in an environment that polluted is
> too small to be worried about (since we already have a tough time
> handling newlines in the environment).

True.  But if that's a real concern, and I suppose it might be, then
we can sanitize the environment on startup, with code that looks
something like this:

for var in `env | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
  eval val=\$var
  case $val in
  *'
'*)
    echo "Unsetting environment variable $var, since it contains a newline"
    eval unset $var
  esac
done




reply via email to

[Prev in Thread] Current Thread [Next in Thread]