Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-05-26 01:05:11 +0400
committerEric Blake <eblake@redhat.com>2011-05-26 01:05:11 +0400
commitc65167c86ed578b96c8466f2b006ef28a62c55c5 (patch)
tree5b43bbce5f1c655fa59ab3d7fc06c7f771f74fdc /newlib
parent4e989b35d152a63d9cf49e3ce942961828e9f0e7 (diff)
* libc/string/strerror.c (_strerror_r): Report "Success" for 0.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog4
-rw-r--r--newlib/libc/string/strerror.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index cf900e453..82ca1a2f7 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,9 @@
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>
+
* libc/string/strerror.c (strerror): Split body into...
(_strerror_r): ...new reentrant function.
* libc/string/u_strerr.c (_user_strerror): Update signature.
diff --git a/newlib/libc/string/strerror.c b/newlib/libc/string/strerror.c
index fd6edd9e2..8852c36c7 100644
--- a/newlib/libc/string/strerror.c
+++ b/newlib/libc/string/strerror.c
@@ -33,6 +33,9 @@ This implementation of <<strerror>> prints out the following strings
for each of the values defined in `<<errno.h>>':
o+
+o 0
+Success
+
o E2BIG
Arg list too long
@@ -361,6 +364,9 @@ _DEFUN (_strerror_r, (ptr, errnum, internal, errptr),
switch (errnum)
{
+ case 0:
+ error = "Success";
+ break;
/* go32 defines EPERM as EACCES */
#if defined (EPERM) && (!defined (EACCES) || (EPERM != EACCES))
case EPERM: