autoconf-patches
[Top][All Lists]
Advanced

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

Re: document AS_BASENAME


From: Stepan Kasal
Subject: Re: document AS_BASENAME
Date: Sat, 1 Apr 2006 19:13:57 +0200
User-agent: Mutt/1.4.1i

Hello Eric,

On Sat, Apr 01, 2006 at 09:59:14AM -0700, Eric Blake wrote:
> Also, if we are handling the special cases up front, then we can guarantee
> that we are no longer calling 'basename /'.  If we decide to take the
> approach of your patch, then _AS_BASENAME_PREPARE becomes extraneous, and
> you should delete it (since we would be removing the one reason we avoid a
> platform basename).

huh!  I had this in a preliminary version of my patch, too.

But I reverted this change because of three reasons:

1)  My code is calling "basename //".  Doesn't Solaris' basename output
an empty line here, too?  (Yes, you propose to remove that.)

2) I'm not sure "basename /" is the only bug around.  The code shall be
interpreted this way:

        "If it handles even basename /, we can hopefully trust it."

Thus I think it would be too adventurous to start using the buggy basename
implementations right now, before the release.

We should not spend much time optimizing for broken platforms.  Your
proposed change can be seen as falling into this category: we are risking
that we will spend more time on this issue if we discover another bug in
some non-compliant implementation, which was avoided by the original code.

3) Pre-computing the as_basename variable saves a subshell in each
AS_BASENAME call with a non-trivial argument.  So _AS_BASENAME_PREPARE is
an efficiency issue, too.  (I even considered adding _AS_DIRNAME_PREPARE.)


Have these reasons (2 and 3, currently) convinced you?

Stepan




reply via email to

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