[Top][All Lists]

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

Re: test for basename failure

From: Eric Blake
Subject: Re: test for basename failure
Date: Mon, 15 Nov 2010 08:45:58 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6

On 11/15/2010 12:01 AM, Paul Eggert wrote:
> On 11/14/2010 04:16 PM, Jerker Bäck wrote:
>> Nothing to do with autoconf then?
> That's right.  Though they probably need to do something more complicated
> than what you suggest.  Perhaps they should use gnulib's basename package;
> it should do the right thing.

Actually, gnulib's basename package is misnamed; it only provides
base_name (and not the POSIX basename).  This is because the POSIX
specification of basename() is rather weak (it's not guaranteed to be
threadsafe, for starters); whereas base_name() has reliable semantics
(it always mallocs the result in a threadsafe manner).

But Paul is correct - the problematic packages should either fix up
their checks for basename() or consider using gnulib's base_name().

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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