summaryrefslogtreecommitdiff
path: root/doc/posix-functions/perror.texi
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-06-07 20:49:04 -0600
committerEric Blake <eblake@redhat.com>2011-06-08 06:50:35 -0600
commit79d4e75d8e14dee5d91f58413942fe875857d4f5 (patch)
tree8e57ed509fe06235828e08e4f49f871fdc43cd8e /doc/posix-functions/perror.texi
parent284602e2840830b0e25ec9069840f061f563cc23 (diff)
downloadgnulib-79d4e75d8e14dee5d91f58413942fe875857d4f5.tar.gz
strerror_r-posix: fix on MacOS
MacOS X 10.5 strerror(0) is "Unknown error: 0", which is not distinguished from "Unknown error: -1" for out-of-range. Worse, strerror_r(0,,) is "Undefined error: 0", although strerror_r for all other out-of-range values matches strerror. * m4/strerror.m4 (gl_FUNC_STRERROR): Flush out MacOS bug. * m4/strerror_r.m4 (gl_FUNC_STRERROR_R_WORKS): Likewise, and fix logic bug. * lib/strerror_r.c (strerror_r): Fix the bug. * lib/strerror.c (strerror): Likewise. * doc/posix-functions/strerror_r.texi (strerror_r): Document the problem. * doc/posix-functions/strerror.texi (strerror): Likewise. * doc/posix-functions/perror.texi (perror): Likewise. * tests/test-strerror.c (main): Enhance test. * tests/test-strerror_r.c (main): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'doc/posix-functions/perror.texi')
-rw-r--r--doc/posix-functions/perror.texi2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/posix-functions/perror.texi b/doc/posix-functions/perror.texi
index ddc7c9b968..c11d2e6882 100644
--- a/doc/posix-functions/perror.texi
+++ b/doc/posix-functions/perror.texi
@@ -15,7 +15,7 @@ OpenBSD 4.0, OSF/1 5.1, Cygwin 1.5.x, mingw.
@item
This function treats @code{errno} of 0 like failure, although POSIX
requires that the message declare it as a success, on some platforms:
-FreeBSD 8.2
+FreeBSD 8.2, MacOS X 10.5.
@item
This function clobbers the @code{strerror} buffer on some platforms:
Cygwin 1.7.9.