On 06/07/2011 09:50 PM, Eric Blake wrote:
> Oh hideous.
> 
> strerror(0) => Unknown error: 0
> strerror_r(0,buf,len) => Undefined error: 0
> strerror(-1) => Unknown error: -1
> strerror_r(-1,buf,len) => Unknown error: -1
> 
> I don't think POSIX requires the same strings for the two
> implementations,

Not directly, but C99 (and therefore POSIX) requires perror and strerror
to use the same strings, and if perror is implemented in terms of
strerror_r, then strerror and strerror_r better use the same strings.
At any rate, my patch fixes things.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to