1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-18 23:42:00 +03:00
Files
gnulib/doc/posix-functions/strerror_r.texi
Bruno Haible 1838494765 New module 'strerror_r-posix'.
* lib/string.in.h (strerror_r): New declaration.
* lib/strerror_r.c: New file.
* m4/strerror_r.m4: New file.
* m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Check for the declaration
of strerror_r.
(gl_HEADER_STRING_H_DEFAULTS): Initialize GNULIB_STRERROR_R,
HAVE_DECL_STRERROR_R, REPLACE_STRERROR_R.
* modules/strerror_r-posix: New file.
* modules/string (Makefile.am): Substitute GNULIB_STRERROR_R,
HAVE_DECL_STRERROR_R, REPLACE_STRERROR_R.
* doc/posix-functions/strerror_r.texi: Mention the new module and the
portability problems.
2010-11-11 13:24:24 +01:00

55 lines
1.7 KiB
Plaintext

@node strerror_r
@section @code{strerror_r}
@findex strerror_r
POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/strerror_r.html}
Gnulib module: strerror_r-posix
Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
NetBSD 3.0, HP-UX 11.23, IRIX 6.5, Solaris 9, mingw.
@item
glibc has an incompatible version of this function. The POSIX compliant code
@smallexample
char *s = (strerror_r (err, buf, buflen) == 0 ? buf : NULL);
@end smallexample
is essentially equivalent to this code using the glibc function:
@smallexample
char *s = strerror_r (err, buf, buflen);
@end smallexample
@item
This function is sometimes not declared in @code{<string.h>} on some platforms:
glibc 2.8, OSF/1 5.1.
@item
The third argument is of type @code{int} instead of @code{size_t} on some
platforms:
AIX 5.1, OSF/1 5.1.
@item
When this function fails, it returns -1 and sets @code{errno}, instead of
returning the error number, on some platforms:
glibc 2.8 with @code{-D_POSIX_C_SOURCE=200112L}, AIX 6.1, OSF/1 5.1.
@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 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.
@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.
@end itemize