This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix perror POSIX compliance


On 05/24/2011 04:08 AM, Corinna Vinschen wrote:
> On May 23 17:16, Eric Blake wrote:
>> 	* libc/string/strerror.c (strerror): Split body into...
>> 	(_strerror_r): ...new reentrant function.
>> 	* libc/string/u_strerr.c (_user_strerror): Update signature.
>> 	* libc/include/stdio.h (_strerror_r): New prototype.
>> 	* libc/posix/collate.c (__collate_err): Adjust callers.
>> 	* libc/stdio/perror.c (_perror_r): Likewise.
>> 	* libc/string/strerror_r.c (strerror_r): Likewise.
>> 	* libc/string/xpg_strerror_r.c (__xpg_strerror_r): Likewise.
> 
> Looks good to me.  It build and runs for me on Cygwin.  You did test it,
> also with the newlib strerror and strerror_r functions, right?  If so,
> please apply.

I've (finally) completed runtime testing of both the newlib patch in
isolation (by #if 0'ing the cygwin errno.cc replacements to pull in the
newlib implementation) and the cygwin patch.

Testing turned up only one issue on the newlib side (cygwin is immune) -
POSIX requires strerror(0) to return a message indicating success,
rather than treating it the same as all other EINVAL inputs.  Patch
coming up shortly, now that this one is pushed.

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

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]