bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCHv2] strerror: drop strerror_r dependency


From: Eric Blake
Subject: Re: [PATCHv2] strerror: drop strerror_r dependency
Date: Mon, 06 Jun 2011 06:37:02 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10

On 06/03/2011 06:28 PM, Bruno Haible wrote:
> Hi Eric,
> 
>> Since the errno module is responsible for introducing replacement
>> errno values, it should also be responsible for translating those
>> new values into strings.  And by moving the replacements into a
>> file managed by the errno, we can then break the dependency between
>> strerror and strerror_r, so that strerror no longer drags in
>> multi-threading modules required by strerror_r.
> 
> Creating a separate strerror-override.[hc] is reasonable.
> 
> However, I'm not in favour of attaching object files to modules that
> are meant to provide a header file. For two reasons:
>   - Not everyone who needs 'errno' also needs strerror() or strerror_r().
>     There are many uses, from iconv() to <pthread.h>, of errno values
>     without the need of a conversion to string.
>   - This change causes trouble for the 'relocatable-prog-wrapper'
>     module. This module is meant to have all its source code compiled
>     on the fly and not provide any object file into libgnu.a (i.e.
>     no AC_LIBOBJ invocations).
> 
> Please, can we revisit this?

You bet.  Looks like we need to go back to my first idea of creating a
separate strerror-override module (needed because strerror and
strerror_r-posix are now independent, but both need the overrides, so
the overrides have to be AC_LIBOBJ at the first client).

-- 
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]