summaryrefslogtreecommitdiff
path: root/doc/posix-functions/perror.texi
Commit message (Collapse)AuthorAgeFilesLines
* perror: Fix "perror clobbers strerror's buffer" problem on Android.Bruno Haible2023-01-111-1/+1
| | | | | * m4/perror.m4 (gl_FUNC_PERROR): Set REPLACE_PERROR to 1 on Android. * doc/posix-functions/perror.texi: Mention the Android problem.
* doc: Update for macOS 11.1.Bruno Haible2021-03-211-1/+1
| | | | | | | | | | * doc/posix-headers/*.texi: Update. * doc/glibc-headers/*.texi: Update. * doc/posix-functions/*.texi: Likewise. * doc/pastposix-functions/*.texi: Likewise. * doc/glibc-functions/*.texi: Likewise. * m4/aligned_alloc.m4 (gl_FUNC_ALIGNED_ALLOC): Update cross-compilation guess.
* doc: Update for Mac OS X 10.13.Bruno Haible2020-07-251-1/+1
| | | | | | | | | * doc/*/*.texi: Update. * m4/expm1l.m4: Update comments. * m4/getgroups.m4: Likewise. * m4/getlogin_r.m4: Likewise. * m4/linkat.m4: Likewise. * m4/printf.m4: Likewise.
* Update some URLsPaul Eggert2019-09-221-1/+1
| | | | | | This is a clerical change that mostly changes http: to https: in URLs where either will work. It also updates some URLs that have moved, removes some URLs that no longer work, and fixes related text.
* doc: Remove documentation of OSF/1 as supported platform.Bruno Haible2019-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/gnulib-intro.texi (Target Platforms): Mention that OSF/1 is unsupported. * doc/glibc-functions/getdomainname.texi: Don't mention OSF/1 specific workarounds. * doc/glibc-functions/pthread_setname_np.texi: Likewise. * doc/glibc-functions/ptsname_r.texi: Likewise. * doc/posix-functions/ceil.texi: Likewise. * doc/posix-functions/ceilf.texi: Likewise. * doc/posix-functions/ceill.texi: Likewise. * doc/posix-functions/fchdir.texi: Likewise. * doc/posix-functions/floor.texi: Likewise. * doc/posix-functions/floorf.texi: Likewise. * doc/posix-functions/fmod.texi: Likewise. * doc/posix-functions/fmodf.texi: Likewise. * doc/posix-functions/fmodl.texi: Likewise. * doc/posix-functions/log.texi: Likewise. * doc/posix-functions/logf.texi: Likewise. * doc/posix-functions/logl.texi: Likewise. * doc/posix-functions/log10.texi: Likewise. * doc/posix-functions/log10f.texi: Likewise. * doc/posix-functions/log10l.texi: Likewise. * doc/posix-functions/log2.texi: Likewise. * doc/posix-functions/log2f.texi: Likewise. * doc/posix-functions/log2l.texi: Likewise. * doc/posix-functions/mbrtowc.texi: Likewise. * doc/posix-functions/recv.texi: Likewise. * doc/posix-functions/recvfrom.texi: Likewise. * doc/posix-functions/remainder.texi: Likewise. * doc/posix-functions/remainderf.texi: Likewise. * doc/posix-functions/remainderl.texi: Likewise. * doc/posix-functions/round.texi: Likewise. * doc/posix-functions/roundf.texi: Likewise. * doc/posix-functions/roundl.texi: Likewise. * doc/posix-functions/send.texi: Likewise. * doc/posix-functions/sendto.texi: Likewise. * doc/posix-functions/setenv.texi: Likewise. * doc/posix-functions/snprintf.texi: Likewise. * doc/posix-functions/tcgetsid.texi: Likewise. * doc/posix-functions/trunc.texi: Likewise. * doc/posix-functions/truncf.texi: Likewise. * doc/posix-functions/truncl.texi: Likewise. * doc/posix-functions/ttyname_r.texi: Likewise. * doc/posix-functions/unsetenv.texi: Likewise. * doc/posix-functions/wcsrtombs.texi: Likewise. * doc/posix-headers/sys_select.texi: Likewise. * doc/posix-headers/wchar.texi: Likewise. * doc/posix-headers/wctype.texi: Likewise. * doc/**/*.texi: Update.
* doc: Remove documentation of Solaris 8 and older as supported platforms.Bruno Haible2019-07-061-1/+1
| | | | | | | | | | | | * doc/gnulib-intro.texi (Target Platforms): Mention that Solaris <= 8 is unsupported. * doc/posix-functions/mbrtowc.texi: Don't mention Solaris specific workarounds. * doc/posix-functions/memcmp.texi: Likewise. * doc/posix-functions/rename.texi: Likewise. * doc/posix-functions/tzset.texi: Likewise. * doc/posix-headers/wctype.texi: Likewise. * doc/**/*.texi: Update.
* doc: Update for MSVC 14.Bruno Haible2017-07-061-1/+1
| | | | | | | | * 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.
* Write "Mac OS X" instead of "MacOS X".Bruno Haible2012-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>.
* doc: Update regarding MSVC 9.Bruno Haible2011-09-111-1/+1
| | | | | | | | | | * 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.
* strerror_r: fix OpenBSD behavior on 0Eric Blake2011-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenBSD treats strerror_r(0,,) as a success, but with a message "Undefined error: 0"; while this is distinct from strerror_r(-1,,) returning "Unknown error: -1", it does not imply success. Meanwhile, if buf is short enough for ERANGE, then we can't use strstr to look for "Unknown" or "Undefined" in the resulting message, like we had been doing for strerror(). Fix this by shifting the burden - now the strerror-override code guarantees that 0 will have an override when needed. * lib/strerror-override.c (strerror_override): Also override 0 when needed. * lib/strerror-override.h (strerror_override): Likewise. * lib/strerror.c (strerror): Simplify, now that 0 override is done earlier. * lib/strerror_r.c (strerror_r): Likewise. * m4/strerror.m4 (gl_FUNC_STRERROR): Split detection of 0 behavior... (gl_FUNC_STRERROR_0): ...into new macro. * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Replace strerror_r if 0 is overridden. (gl_FUNC_STRERROR_R_WORKS): Avoid extra tests if 0 is broken. * modules/strerror-override (Files): Add strerror.m4. (configure.ac): Also provide override for 0 when needed. * doc/posix-functions/strerror.texi (strerror): Document this. * doc/posix-functions/perror.texi (perror): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* strerror_r-posix: fix on MacOSEric Blake2011-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* perror: document fixed bugsEric Blake2011-06-071-0/+7
| | | | | | | * doc/posix-functions/perror.texi (perror): Document recent patches. Signed-off-by: Eric Blake <eblake@redhat.com>
* test-perror: relax test to ignore cygwin bugEric Blake2011-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glibc was not the only platform where fprintf(fopen(,"r")) fails to detect errors; cygwin 1.7.9 is another culprit (although it will be fixed for 1.7.10), and I suspect that several other platforms were failing perror2 for the same reason. At this point, there are so many functions affected, and the way to avoid the bug is easy enough (don't pass bogus streams to output-producing functions), that I'm not worried about fixing things other than to document them. * tests/test-perror2.c (main): Relax test on requiring detection of stream errors, and use unbuffered stream. * doc/posix-functions/dprintf.texi (dprintf): Document bug. * doc/posix-functions/fprintf.texi (fprintf): Likewise. * doc/posix-functions/fputc.texi (fputc): Likewise. * doc/posix-functions/fputs.texi (fputs): Likewise. * doc/posix-functions/fputws.texi (fputws): Likewise. * doc/posix-functions/fwprintf.texi (fwprintf): Likewise. * doc/posix-functions/fwrite.texi (fwrite): Likewise. * doc/posix-functions/getopt.texi (getopt): Likewise. * doc/posix-functions/perror.texi (perror): Likewise. * doc/posix-functions/printf.texi (printf): Likewise. * doc/posix-functions/psiginfo.texi (psiginfo): Likewise. * doc/posix-functions/psignal.texi (psignal): Likewise. * doc/posix-functions/putc.texi (putc): Likewise. * doc/posix-functions/putc_unlocked.texi (putc_unlocked): Likewise. * doc/posix-functions/putchar.texi (putchar): Likewise. * doc/posix-functions/putchar_unlocked.texi (putchar_unlocked): Likewise. * doc/posix-functions/puts.texi (puts): Likewise. * doc/posix-functions/putwc.texi (putwc): Likewise. * doc/posix-functions/putwchar.texi (putwchar): Likewise. * doc/posix-functions/vdprintf.texi (vdprintf): Likewise. * doc/posix-functions/vfprintf.texi (vfprintf): Likewise. * doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise. * doc/posix-functions/vprintf.texi (vprintf): Likewise. * doc/posix-functions/vwprintf.texi (vwprintf): Likewise. * doc/posix-functions/wordexp.texi (wordexp): Likewise. * doc/posix-functions/wprintf.texi (wprintf): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* perror: call strerror_r directlyEric Blake2011-06-011-0/+4
| | | | | | | | | | | | | No need to make a wrapper that burns static storage when we can just use stack storage. * modules/perror (Files): Drop strerror-impl.h. * lib/perror.c (perror): Use our own stack buffer, rather than calling a wrapper that uses static storage. * doc/posix-functions/perror.texi (perror): Document a limitation of our replacement. Signed-off-by: Eric Blake <eblake@redhat.com>
* perror: work around FreeBSD bugEric Blake2011-05-201-0/+4
| | | | | | | | | | | | | | | | | | | | | POSIX requires that 'errno = 0; perror ("")' print the same message as strerror(0), but this failed if we were replacing strerror to work around the FreeBSD bug of treating 0 as a failure. The goal here is to _not_ replace perror on glibc, even though strerror_r has to be replaced, because the strerror_r replacement is only for the sake of correcting the signature rather than working around bugs in the handling of any particular errnum value. Recall that $gl_cv_func_strerror_r_works is only set if the POSIX signature was detected in the first place. * m4/perror.m4 (gl_FUNC_PERROR): Also replace perror if strerror_r is broken. Move AC_LIBOBJ... * modules/perror (configure.ac): Here. * doc/posix-functions/perror.texi (perror): Document this. * tests/test-perror2.c (main): Enhance test. Signed-off-by: Eric Blake <eblake@redhat.com>
* test-perror: check for strerror interactionsEric Blake2011-05-201-0/+4
| | | | | | | | | | | | | This uncovered a glibc bug, although not many people check for perror failures, so for now I'm not working around it. http://sourceware.org/bugzilla/show_bug.cgi?id=12792 * tests/macros.h (STREQ) Add macro. * modules/perror-tests (Files): Add second test. * tests/test-perror2.c (main): New file. * doc/posix-functions/perror.texi (perror): Document glibc bug. Signed-off-by: Eric Blake <eblake@redhat.com>
* avoid some overlong lines from posix urls, etc.Karl Berry2010-08-131-1/+1
|
* doc: mention more functions added in cygwin 1.7.0Eric Blake2009-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/posix-functions/abort.texi (abort): Update wording related to cygwin. * doc/posix-functions/daylight.texi (daylight): Likewise. * doc/posix-functions/optarg.texi (optarg): Likewise. * doc/posix-functions/optarg.texi (opterr): Likewise. * doc/posix-functions/optarg.texi (optind): Likewise. * doc/posix-functions/optarg.texi (optopt): Likewise. * doc/posix-functions/wprintf.texi (wprintf): Cygwin wprintf never worked in 1.5.x, and was withdrawn in 1.7. * doc/posix-functions/vwprintf.texi (vwprintf): Likewise. * doc/posix-functions/fprintf.texi (fprintf): Tighten mention of cygwin versions. * doc/posix-functions/perror.texi (perror): Likewise. * doc/posix-functions/printf.texi (printf): Likewise. * doc/posix-functions/snprintf.texi (snprintf): Likewise. * doc/posix-functions/sprintf.texi (sprintf): Likewise. * doc/posix-functions/vfprintf.texi (vfprintf): Likewise. * doc/posix-functions/vprintf.texi (vprintf): Likewise. * doc/posix-functions/vsnprintf.texi (vsnprintf): Likewise. * doc/posix-functions/vsprintf.texi (vsprintf): Likewise. * doc/glibc-functions/obstack_printf.texi (obstack_printf): Likewise. * doc/glibc-functions/obstack_vprintf.texi (obstack_vprintf): Likewise. * doc/glibc-functions/cfmakeraw.texi (cfmakeraw): Cygwin 1.7 adds this function. * doc/glibc-functions/in6addr_any.texi (in6addr_any): Likewise. * doc/glibc-functions/in6addr_loopback.texi (in6addr_loopback): Likewise. * doc/glibc-functions/updwtmpx.texi (updwtmpx): Likewise. * doc/posix-functions/_Exit_C99.texi (_Exit): Likewise. * doc/posix-functions/confstr.texi (confstr): Likewise. * doc/posix-functions/dprintf.texi (dprintf): Likewise. * doc/posix-functions/fgetwc.texi (fgetwc): Likewise. * doc/posix-functions/fgetws.texi (fgetws): Likewise. * doc/posix-functions/fputwc.texi (fputwc): Likewise. * doc/posix-functions/fputws.texi (fputws): Likewise. * doc/posix-functions/fwide.texi (fwide): Likewise. * doc/posix-functions/getwc.texi (getwc): Likewise. * doc/posix-functions/getwchar.texi (getwchar): Likewise. * doc/posix-functions/putwc.texi (putwc): Likewise. * doc/posix-functions/putwchar.texi (putwchar): Likewise. * doc/posix-functions/sigignore.texi (sigignore): Likewise. * doc/posix-functions/ungetwc.texi (ungetwc): Likewise. * doc/posix-functions/vdprintf.texi (vdprintf): Likewise. * doc/posix-functions/wcpcpy.texi (wcpcpy): Likewise. * doc/posix-functions/wcpncpy.texi (wcpncpy): Likewise. * doc/posix-functions/wcstol.texi (wcstol): Likewise. * doc/posix-functions/wcstoll.texi (wcstoll): Likewise. * doc/posix-functions/wcstoul.texi (wcstoul): Likewise. * doc/posix-functions/wcstoull.texi (wcstoull): Likewise. * doc/posix-functions/wcsxfrm.texi (wcsxfrm): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Refer to new POSIX:2008 standard.Bruno Haible2008-12-141-1/+1
|
* Override <errno.h> also on Cygwin.Bruno Haible2008-09-151-1/+1
|
* New module 'perror'.Bruno Haible2008-09-141-1/+5
|
* Rename two directories: headers -> posix-headers, functions -> posix-functions.Bruno Haible2008-01-201-0/+15