provide __xpg_strerror_r

Eric Blake
Sat Feb 5 20:45:00 GMT 2011

On 02/05/2011 01:28 PM, Christopher Faylor wrote:
> On Sat, Feb 05, 2011 at 01:04:16PM -0700, Eric Blake wrote:
>> Our strerror_r is lousy (it doesn't even match glibc's behavior); see my
>> request to the newlib list.
> We really should just implement strerror_r in  It doesn't make
> sense to have two different implementations

You mean, implement the POSIX interface for strerror_r in, and
ditch glibc compatibility?  But, backwards compatibility demands that we
have two interfaces - the glibc one that returns char* for satisfying
the link demands of existing applications, and the POSIX one that
returns int, so we really are stuck with providing two forms of
strerror_r if we intend to comply with POSIX.

We already provide our own strerror() (it provides a better experience
for out-of-range values that the newlib interface), but we're currently
using the newlib strerror_r() (in spite of its truncation flaw).

How should I rework this patch?

Eric Blake    +1-801-349-2682
Libvirt virtualization library

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Cygwin-patches mailing list