strerror: enforce POSIX ruling on strerror(0)
[gnulib.git] / doc / posix-functions / strerror.texi
1 @node strerror
2 @section @code{strerror}
3 @findex strerror
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/strerror.html}
6
7 Gnulib module: strerror
8
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This function does not support the error values that are specified by POSIX
13 but not defined by the system, on some platforms:
14 OpenBSD 4.0, OSF/1 5.1, NonStop Kernel, Cygwin 1.5.x, mingw.
15 @item
16 This function reports failure (by setting @code{errno}) for
17 @code{strerror(0)}, although POSIX requires this to leave @code{errno}
18 unchanged and report success, on some platforms:
19 FreeBSD 8.2
20 @item
21 This function fails to return a string for out-of-range integers on
22 some platforms:
23 HP-UX 11, IRIX 6.5, Solaris 8.
24 (Some return NULL which is a POSIX violation, others return the empty
25 string which is valid but not as useful); this can still cause bugs
26 because most programs call @code{strerror} without setting and testing
27 @code{errno}.)
28 @end itemize
29
30 Portability problems not fixed by Gnulib:
31 @itemize
32 @end itemize