poll tests: Avoid test failure on BSD and Solaris systems.
[gnulib.git] / doc / posix-functions / strerror.texi
blobb28ede4b3096569e4dd0ef5836a41f2f155637de
1 @node strerror
2 @section @code{strerror}
3 @findex strerror
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html}
7 Gnulib module: strerror
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, NonStop Kernel, Cygwin 1.5.x, mingw, MSVC 14.
15 @item
16 This function reports failure for @code{strerror(0)} (by setting
17 @code{errno} or using a string similar to out-of-range values),
18 although POSIX requires this to leave @code{errno} unchanged and
19 report success, on some platforms:
20 FreeBSD 8.2, NetBSD 9.0, OpenBSD 4.7, Mac OS X 10.13.
21 @item
22 This function fails to return a string for out-of-range integers on
23 some platforms:
24 HP-UX 11, IRIX 6.5.
25 (Some return NULL which is a POSIX violation, others return the empty
26 string which is valid but not as useful); this can still cause bugs
27 because most programs call @code{strerror} without setting and testing
28 @code{errno}.)
29 @end itemize
31 Portability problems not fixed by Gnulib:
32 @itemize
33 @end itemize