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?
--
Eric Blake