strerror_r: fix Solaris test failures
[gnulib.git] / doc / posix-functions / strerror_r.texi
index bf43164..e0f19c0 100644 (file)
@@ -22,6 +22,9 @@ is essentially equivalent to this code using the glibc function:
 char *s = strerror_r (err, buf, buflen);
 @end smallexample
 @item
+This function clobbers the @code{strerror} buffer on some platforms:
+Cygwin 1.7.9.
+@item
 This function is sometimes not declared in @code{<string.h>} on some platforms:
 glibc 2.8, OSF/1 5.1.
 @item
@@ -33,23 +36,36 @@ When this function fails, it returns -1 and sets @code{errno}, instead of
 returning the error number, on some platforms:
 glibc 2.12 with @code{-D_POSIX_C_SOURCE=200112L}, AIX 6.1, OSF/1 5.1.
 @item
+When this function fails, it corrupts @code{errno}, on some platforms:
+Solaris 10.
+@item
 This function does not support the error values that are specified by POSIX
 but not defined by the system, on some platforms:
 OpenBSD 4.0, OSF/1 5.1, NonStop Kernel, Cygwin 1.5.x.
 @item
+This function reports failure for @code{strerror_r(0, buf, len)},
+although POSIX requires this to succeed, on some platforms:
+FreeBSD 8.2
+@item
 This function always fails when the third argument is less than 80 on some
 platforms:
 HP-UX 11.31.
 @item
-When the buffer is too small, this function does not fail, but instead
-truncates the result and returns 0 on some platforms:
-OSF/1 5.1.
+When the buffer is too small and the value is in range, this function
+does not fail, but instead truncates the result and returns 0 on some
+platforms:
+AIX 6.1, OSF/1 5.1.
+@item
+When the value is not in range or the buffer is too small, this
+function fails to leave a NUL-terminated string in the buffer on some
+platforms:
+glibc 2.13, FreeBSD 8.2, Solaris 10.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
-When the buffer is too small, this function does not fail, but instead
-truncates the result and returns 0 on some platforms:
-AIX 6.1.
+Calling this function can clobber the buffer used by @code{strerror}
+on some platforms:
+Cygwin 1.7.9.
 @end itemize