On 03/18/2011 03:35 AM, Stefan Puiu wrote: >> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> > [...] >> >> http://sourceware.org/bugzilla/show_bug.cgi?id=12204 >> documents glibc's change to come into compliance with POSIX >> regarding strerror_r return value. The GNU strerror_r use >> of buf was confusing - I ended up writing a test program that >> proves that buf is unused for valid errnum, but contains >> truncated "unknown message" for out-of-range errnum. > >> +on error, glibc 2.13 returns a positive error number, while >> +older versions returned \-1 and set >> .I errno >> -is set to indicate the error. >> +indicate the error instead. > > to indicate the error instead? Yes. > >> .SH ERRORS >> .TP >> .B EINVAL >> @@ -165,6 +168,7 @@ On some systems, >> .\" e.g., Solaris 8, HP-UX 11 >> .BR strerror () >> returns NULL if the error number is unknown. >> +POSIX.1-2008 requires the result to be non-NULL for all inputs. > > Maybe you could mention C99 as well, since you were saying it also > mandates this behavior? Would make sense. Do you need me to resubmit with those corrections, or can you squash it in yourself when applying? > Otherwise, the patch looks ok to me. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature