Eric Blake wrote:
> Eric Blake <ebb9 <at> byu.net> writes:
>
>>> m4_defun([AS_UNSET],
>>> -[AS_REQUIRE([_AS_UNSET_PREPARE])dnl
>>> -$as_unset $1 || test "${$1+set}" != set || { $1=$2; export $1; }])
>>> +[{ unset $1 >/dev/null 2>&1 || :;}])
>
> The bash 2.05a bug was that unset gave exit status 1 when it had no work to
> do. Wouldn't it just be easier to write:
>
> m4_defun([AS_UNSET], [{ $1=; unset $1;}])
>
> thus guaranteeing that unset has work to do, while letting unset properly
> fail
> (and stderr explain why) on attempts to unset a readonly variable?
Of course. Good idea. I'll then remove the other place where I used x=
before AS_UNSET([x]) just in case we screwed up something and we left a
few kilobytes worth of variable.
I'll also leave _AS_UNSET_PREPARE in AS_SHELL_SANITIZE. $as_unset was
undocumented, but I'd rather not drop support right away for something
that Libtool uses.
Paolo