doc/posix-functions/strerror_r.texi


Log

Author Commit Date CI Message
Bruno Haible be18f917 2018-05-13T13:44:57 doc: Add info about Android versions 2.0 to 8.1. * doc/**/*.texi: Add info about functions in all released versions of Bionic.
Bruno Haible 411ad115 2017-10-29T17:33:22 strerror_r-posix: Fix behaviour and test failure on Haiku. * lib/strerror_r.c (strerror_r): Don't assume that valid error numbers are positive. Work around return value 0 instead of ERANGE on Haiku. For unknown error numbers, use a format string consistent with perror(). * doc/posix-functions/strerror_r.texi: Mention the Haiku problem. * tests/test-strerror_r.c (main): Don't assume that valid error numbers are positive.
Bruno Haible 8fb59b8f 2017-07-06T01:10:39 doc: Update for MSVC 14. * doc/posix-headers/*.texi: Add info about MSVC 14. * doc/posix-functions/*.texi: Likewise. * doc/pastposix-functions/*.texi: Likewise. * doc/glibc-headers/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise.
Bruno Haible 765a4060 2017-04-29T13:23:28 strerror_r-posix: Fixes for MSVC 14. * lib/strerror_r.c: Include <stdarg.h>. (strerror_r): Provide error messages for errno values 100...140. * doc/posix-functions/strerror_r.texi: Mention the MSVC 14 problem.
Paul Eggert 72fa964f 2012-12-27T01:16:25 Hyphen and dash fixes.
Bruno Haible 06b335ad 2012-06-22T13:26:07 Write "Mac OS X" instead of "MacOS X". * README: Write "Mac OS X" instead of "MacOS X". * build-aux/bootstrap: Likewise. * build-aux/install-reloc: Likewise. * lib/acl-internal.h: Likewise. * lib/acl_entries.c: Likewise. * lib/argp-ba.c: Likewise. * lib/argp-pv.c: Likewise. * lib/config.charset: Likewise. * lib/copy-acl.c: Likewise. * lib/csharpexec.c: Likewise. * lib/euidaccess.c: Likewise. * lib/fbufmode.c: Likewise. * lib/fflush.c: Likewise. * lib/file-has-acl.c: Likewise. * lib/filemode.h: Likewise. * lib/fpurge.c: Likewise. * lib/freadable.c: Likewise. * lib/freadahead.c: Likewise. * lib/freading.c: Likewise. * lib/freadptr.c: Likewise. * lib/freadseek.c: Likewise. * lib/fseeko.c: Likewise. * lib/fseterr.c: Likewise. * lib/fsusage.c: Likewise. * lib/fwritable.c: Likewise. * lib/fwriting.c: Likewise. * lib/get-rusage-as.c: Likewise. * lib/get-rusage-data.c: Likewise. * lib/getdomainname.c: Likewise. * lib/idpriv-drop.c: Likewise. * lib/idpriv-droptemp.c: Likewise. * lib/localcharset.c: Likewise. * lib/locale.in.h: Likewise. * lib/localename.c: Likewise. * lib/mbsrtowcs-state.c: Likewise. * lib/nproc.c: Likewise. * lib/passfd.c: Likewise. * lib/posix_openpt.c: Likewise. * lib/printf-parse.c: Likewise. * lib/progreloc.c: Likewise. * lib/safe-read.h: Likewise. * lib/safe-write.h: Likewise. * lib/sched.in.h: Likewise. * lib/set-mode-acl.c: Likewise. * lib/signal.in.h: Likewise. * lib/stdint.in.h: Likewise. * lib/stdio-impl.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/strtod.c: Likewise. * lib/sys_select.in.h: Likewise. * lib/tcgetsid.c: Likewise. * lib/unistd.in.h: Likewise. * lib/unlockpt.c: Likewise. * lib/vasnprintf.c: Likewise. * lib/vma-iter.c: Likewise. * lib/wcsrtombs-state.c: Likewise. * m4/acl.m4: Likewise. * m4/acosl.m4: Likewise. * m4/asinl.m4: Likewise. * m4/atanl.m4: Likewise. * m4/c-stack.m4: Likewise. * m4/cosl.m4: Likewise. * m4/expl.m4: Likewise. * m4/extensions.m4: Likewise. * m4/fdatasync.m4: Likewise. * m4/fmal.m4: Likewise. * m4/frexp.m4: Likewise. * m4/frexpf.m4: Likewise. * m4/frexpl.m4: Likewise. * m4/fsusage.m4: Likewise. * m4/getdomainname.m4: Likewise. * m4/getloadavg.m4: Likewise. * m4/getopt.m4: Likewise. * m4/gettext.m4: Likewise. * m4/gnulib-common.m4: Likewise. * m4/intdiv0.m4: Likewise. * m4/intlmacosx.m4: Likewise. * m4/largefile.m4: Likewise. * m4/ldexpl.m4: Likewise. * m4/link-follow.m4: Likewise. * m4/locale-ar.m4: Likewise. * m4/locale-fr.m4: Likewise. * m4/locale-ja.m4: Likewise. * m4/locale-tr.m4: Likewise. * m4/locale-zh.m4: Likewise. * m4/locale_h.m4: Likewise. * m4/lock.m4: Likewise. * m4/logl.m4: Likewise. * m4/mathfunc.m4: Likewise. * m4/minus-zero.m4: Likewise. * m4/mktime.m4: Likewise. * m4/mmap-anon.m4: Likewise. * m4/multiarch.m4: Likewise. * m4/nanosleep.m4: Likewise. * m4/nocrash.m4: Likewise. * m4/poll.m4: Likewise. * m4/printf-frexpl.m4: Likewise. * m4/printf.m4: Likewise. * m4/signbit.m4: Likewise. * m4/sinl.m4: Likewise. * m4/sqrtl.m4: Likewise. * m4/strerror_r.m4: Likewise. * m4/tanl.m4: Likewise. * m4/threadlib.m4: Likewise. * m4/ttyname_r.m4: Likewise. * m4/unlink.m4: Likewise. * m4/visibility.m4: Likewise. * m4/wcwidth.m4: Likewise. * tests/minus-zero.h: Likewise. * tests/test-alloca-opt.c: Likewise. * tests/test-copy-acl.sh: Likewise. * tests/test-copy-file.sh: Likewise. * tests/test-fdatasync.c: Likewise. * tests/test-file-has-acl.sh: Likewise. * tests/test-flock.c: Likewise. * tests/test-fsync.c: Likewise. * tests/test-localename.c: Likewise. * tests/test-malloca.c: Likewise. * tests/test-nonblocking-pipe.h: Likewise. * tests/test-nonblocking-socket.h: Likewise. * tests/test-openpty.c: Likewise. * tests/test-posix_openpt.c: Likewise. * tests/test-ptsname.c: Likewise. * tests/test-ptsname_r.c: Likewise. * tests/test-sameacls.c: Likewise. * tests/test-select.h: Likewise. * tests/test-set-mode-acl.sh: Likewise. * tests/test-snprintf-posix.h: Likewise. * tests/test-sprintf-posix.h: Likewise. * tests/test-strtod.c: Likewise. * tests/test-time.c: Likewise. * tests/test-vasnprintf-posix.c: Likewise. * tests/test-vasprintf-posix.c: Likewise. * doc/acl-resources.txt: Likewise. * doc/**/*.texi: Likewise. Reported by Max Horn <max@quendi.de>.
Bruno Haible 4e39aa42 2011-09-11T21:56:17 doc: Update regarding MSVC 9. * doc/gnulib-intro.texi (Target Platforms): Classify MSVC as "rarely tested". * doc/posix-functions/*.texi: Update with info about MSVC 9. * doc/posix-headers/*.texi: Likewise. * doc/pastposix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise. * doc/glibc-headers/*.texi: Likewise.
Bruno Haible ca2c8579 2011-07-31T14:31:24 Documentation about Minix. * doc/posix-headers/*.texi: Add info about Minix 3.1.8. * doc/glibc-headers/*.texi: Likewise. * doc/posix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise.
Eric Blake 23d3c1a2 2011-06-21T10:00:55 strerror_r: fix OpenBSD behavior on out-of-range On OpenBSD, strerror_r(1000,buf,19) gives "Unknown error: " rather than "Unknown error: 100" while failing with ERANGE. Admittedly, this behavior is nice, since a truncated integer is misleading, but all other platforms use maximal strings on ERANGE and we are already replacing strerror_r for other reasons, so it is easier to work around this behavior than to adjust the testsuite (how do you quickly decide if the only reason that the ERANGE string was shorter than maximal was because the implementation avoided truncating an integer?). This patch intentionally avoids dragging in the strnlen module. * lib/strerror_r.c (strerror_r): Always use maximal string. * doc/posix-functions/strerror_r.texi (strerror_r): Document it. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 79d4e75d 2011-06-07T20:49:04 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>
Eric Blake 4018d9e0 2011-06-06T17:59:01 strerror_r-posix: work around cygwin 1.7.9 Cygwin __xpg_strerror_r clobbers strerror, until cygwin 1.7.10; in this case, we must replace strerror, but there was nothing in strerror.m4 finding fault with cygwin's native strerror. Solve this by splitting strerror_r.m4 into two parts, one for probing for the strerror_r bug, and one for replacing strerror_r based on the presence of bugs unrelated to signature issues; that way, the 'strerror' module in isolation will not replace strerror, but if strerror_r is in use for any other reason, then the two use separate buffers. Note that cygwin's strerror is thread-safe while the gnulib replacement is not; but this is no worse than any other platform where strerror is not thread-safe; in a single-threaded program, the difference is not observable, and in a multi-threaded program, you really shouldn't be using strerror in the first place. Also note that this ends up replacing glibc 2.13 strerror as it deems __xpg_strerror_r broken on that platform, which isn't technically necessary for strerror, but doesn't hurt too much. Meanwhile, glibc 2.14 fixed __xpg_strerror_r, and strerror is not replaced in that scenario. * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Split... (gl_FUNC_STRERROR_R_WORKS): ...into new macro, to detect Cygwin bug without replacing strerror_r. * m4/strerror.m4 (gl_FUNC_STRERROR): Replace strerror if strerror_r is buggy, but without requiring strerror_r compilation. * doc/posix-functions/strerror_r.texi (strerror_r): Fix docs. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake e67e250d 2011-05-23T21:05:07 strerror_r: fix Solaris test failures Solaris 10 populates buf on EINVAL, but not on ERANGE. * lib/strerror_r.c (strerror_r): Partially populate buf on ERANGE failures. * doc/posix-functions/strerror_r.texi (strerror_r): Document this. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 3a3fe58b 2011-05-18T15:19:51 strerror_r: enforce POSIX recommendations POSIX recommends (but does not require) that strerror_r populate buf even on error. But since we guarantee this behavior for strerror, we might as well also guarantee it for strerror_r. * lib/strerror_r.c (safe_copy): New helper method. (strerror_r): Guarantee a non-empty string. * tests/test-strerror_r.c (main): Enhance tests to incorporate recent POSIX rulings and to match our strerror guarantees. * doc/posix-functions/strerror_r.texi (strerror_r): Document this. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 2f035758 2011-05-21T10:08:28 strerror_r: avoid clobbering strerror on cygwin Avoid cygwin strerror_r, since it clobbers strerror buffer through cygwin 1.7.9. __xpg_strerror_r is okay, but if a program is compiled on cygwin 1.7.8 or earlier, it is not available. * lib/strerror_r.c (strerror_r): Don't use cygwin's strerror_r; fall back instead to sys_errlist. * modules/strerror (configure.ac): Add witness. * tests/test-strerror_r.c (main): Enhance test. * doc/posix-functions/strerror_r.texi (strerror_r): Document it. * tests/test-perror2.c (main): Free memory before exit. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 179ecbe2 2011-05-20T17:45:13 strerror_r: avoid corrupting errno on Solaris On Solaris, a non-zero return was also reflected into errno. Leaving errno unchanged is a useful feature worth guaranteeing. * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Check for Solaris behavior. * doc/posix-functions/strerror_r.texi (strerror_r): Document it. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake 1608fbc0 2011-05-18T18:16:59 strerror: enforce POSIX ruling on strerror(0) http://austingroupbugs.net/view.php?id=382 requires that strerror(0) succeed, but FreeBSD reports "Unknown error: 0" and fails with EINVAL. * m4/strerror.m4 (gl_FUNC_STRERROR_SEPARATE): Expose BSD bug. * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Likewise. * lib/strerror_r.c (rpl_strerror_r): Work around it. * doc/posix-functions/strerror.texi (strerror): Document it. * doc/posix-functions/strerror_r.texi (strerror_r): Likewise. * tests/test-strerror.c (main): Strengthen test. * tests/test-strerror_r.c (main): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
Eric Blake cda784e7 2011-02-05T12:15:59 strerror_r-posix: port to cygwin * lib/strerror_r.c (strerror_r) [__CYGWIN__]: Add cygwin implementation. * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Adjust comment. * tests/test-strerror_r.c (main): Fix test. * doc/posix-functions/strerror_r.texi (strerror_r): Document the issue. Signed-off-by: Eric Blake <eblake@redhat.com>
Bruno Haible a9e64925 2010-12-26T02:02:44 strerror_r-posix: Update doc. * doc/posix-functions/strerror_r.texi: Update doc about the return value. See <http://sources.redhat.com/bugzilla/show_bug.cgi?id=12204>.
Bruno Haible 18384947 2010-11-11T13:15:28 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.
Karl Berry 80fc442c 2010-08-13T11:50:58 avoid some overlong lines from posix urls, etc.
Bruno Haible 09ef7461 2008-12-14T14:38:13 Refer to new POSIX:2008 standard.
Bruno Haible 2b6c08c7 2008-01-20T00:09:59 Rename two directories: headers -> posix-headers, functions -> posix-functions.