[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] modernize AS_UNSET a bit (take 2)
From: |
Eric Blake |
Subject: |
Re: [PATCH] modernize AS_UNSET a bit (take 2) |
Date: |
Tue, 14 Oct 2008 16:56:14 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
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