* libc/string/strerror.c (_strerror_r): Report "Success" for 0.

This commit is contained in:
Eric Blake 2011-05-25 21:05:11 +00:00
parent 4e989b35d1
commit c65167c86e
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2011-05-25 Eric Blake <eblake@redhat.com>
* libc/string/strerror.c (_strerror_r): Report "Success" for 0.
2011-05-25 Eric Blake <eblake@redhat.com> 2011-05-25 Eric Blake <eblake@redhat.com>
* libc/string/strerror.c (strerror): Split body into... * libc/string/strerror.c (strerror): Split body into...

View File

@ -33,6 +33,9 @@ This implementation of <<strerror>> prints out the following strings
for each of the values defined in `<<errno.h>>': for each of the values defined in `<<errno.h>>':
o+ o+
o 0
Success
o E2BIG o E2BIG
Arg list too long Arg list too long
@ -361,6 +364,9 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
switch (errnum) switch (errnum)
{ {
case 0:
error = "Success";
break;
/* go32 defines EPERM as EACCES */ /* go32 defines EPERM as EACCES */
#if defined (EPERM) && (!defined (EACCES) || (EPERM != EACCES)) #if defined (EPERM) && (!defined (EACCES) || (EPERM != EACCES))
case EPERM: case EPERM: