summaryrefslogtreecommitdiff
path: root/lib/strerror-override.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* errno: port to LynxOS 178 2.2.2Paul Eggert2012-11-051-0/+5
| | | | | | | | | | Problem reported by Joel Brobecker in <http://lists.gnu.org/archive/html/bug-gnulib/2012-10/msg00088.html>. * doc/posix-headers/errno.texi (errno.h): Document this. * lib/errno.in.h (EILSEQ, GNULIB_defined_EILSEQ) [!EILSEQ]: New macros. * lib/strerror-override.c, lib/strerror-override.h (strerror_override): Supply a string for EILSEQ. * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Check for EILSEQ.
* error, strerror-override: Support mingw64 from Fedora 17.Paolo Bonzini2012-06-031-0/+2
| | | | | | | | | * lib/errno.in.h (GNULIB_defined_ESTREAMS): Use a different indicator for ETXTBSY, ENODATA, ENOSR, ENOSTR, ETIME, EOTHER, compared to EINPROGRESS. * lib/strerror-override.h (strerror_override): Test it. * lib/strerror-override.c (strerror_override): Likewise. * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also ETXTBSY.
* error, strerror-override: Support mingw64 from Fedora 17.Paolo Bonzini2012-06-031-0/+3
| | | | | | | * lib/errno.in.h (GNULIB_defined_ENOTRECOVERABLE): Use a different indicator for ENOTRECOVERABLE, compared to EOWNERDEAD. * lib/strerror-override.h (strerror_override): Test it. * lib/strerror-override.c (strerror_override): Likewise.
* error, strerror-override: Support new errno values from POSIX:2008.Bruno Haible2012-06-031-4/+7
| | | | | | | | | | | | | | | * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also EOWNERDEAD and ENOTRECOVERABLE. * lib/errno.in.h (EOWNERDEAD, ENOTRECOVERABLE): Define on all platforms. * lib/strerror-override.c (strerror_override): Conditionalize the EOWNERDEAD, ENOTRECOVERABLE handling on GNULIB_defined_EOWNERDEAD. * lib/strerror-override.h (strerror_override): Declare also if GNULIB_defined_EOWNERDEAD is defined. * tests/test-errno.c (e130, e131): New variables. * doc/posix-headers/errno.texi: Mention the status for EOWNERDEAD, ENOTRECOVERABLE. Reported by Paolo Bonzini.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* errno, strerror-override: Support for MSVC 10.Bruno Haible2011-10-221-46/+56
| | | | | | | | | | | | | | | | | | | * lib/errno.in.h (GNULIB_defined_ETXTBSY): Remove macro. (ENOMSG, EIDRM, ENOLINK, EPROTO, EBADMSG, EOVERFLOW, ENOTSUP, ENETRESET, ECONNABORTED, ECANCELED, EINPROGRESS, EALREADY, ENOTSOCK, EDESTADDRREQ, EMSGSIZE, EPROTOTYPE, ENOPROTOOPT, EPROTONOSUPPORT, EOPNOTSUPP, EAFNOSUPPORT, EADDRINUSE, EADDRNOTAVAIL, ENETDOWN, ENETUNREACH, ECONNRESET, ENOBUFS, EISCONN, ENOTCONN, ETIMEDOUT, ECONNREFUSED, ELOOP, EHOSTUNREACH, EWOULDBLOCK, ETXTBSY) [Win32]: Assign values compatible with MSVC 10. (ENODATA, ENOSR, ENOSTR, ENOTRECOVERABLE, EOWNERDEAD, ETIME, EOTHER): New macros. (GNULIB_defined_EWINSOCK): New macro. * lib/strerror-override.c (strerror_override): Update accordingly. * lib/strerror-override.h: Likewise. * lib/w32sock.h (set_winsock_errno): Map those WSA* values that are no longer equal to the corresponding errno value. Reported by Michael Goffioul <michael.goffioul@gmail.com>.
* errno: Port to Minix.Bruno Haible2011-07-311-0/+10
| | | | | | | | | | | | * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also whether ENETRESET and ECONNABORTED are defined. * lib/errno.in.h (ENETRESET, GNULIB_defined_ENETRESET, ECONNABORTED, GNULIB_defined_ECONNABORTED): New macros. * lib/strerror-override.h (strerror_override): Test also GNULIB_defined_ENETRESET, GNULIB_defined_ECONNABORTED. * lib/strerror-override.c (strerror_override): Handle also ENETRESET, ECONNABORTED. * doc/posix-headers/errno.texi: Mention the Minix problem.
* strerror_r: fix OpenBSD behavior on 0Eric Blake2011-06-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-override: reduce sizeEric Blake2011-06-211-176/+95
| | | | | | * lib/strerror-override.c (strerror_override): Use fewer lines. Signed-off-by: Eric Blake <eblake@redhat.com>
* strerror-override: Don't disable symbol renamings.Bruno Haible2011-06-041-4/+2
| | | | | | * lib/strerror-override.h: Include errno.h and stddef.h, not string.h. * lib/strerror-override.c: Include config.h. (strerror_override): Don't undefine.
* strerror: drop strerror_r dependencyEric Blake2011-06-011-0/+347
Since the errno module is responsible for introducing replacement errno values, it should also be responsible for translating those new values into strings. And by moving the replacements into a file managed by the errno, we can then break the dependency between strerror and strerror_r, so that strerror no longer drags in multi-threading modules required by strerror_r. Tested on glibc with: gl_cv_header_errno_h_complete=no gl_cv_func_working_strerror=no \ gl_cv_func_strerror_r_works=no ./gnulib-tool --with-tests \ --test strerror strerror_r-posix * lib/strerror_r.c (strerror_r): Move gnulib replacement strings... * lib/strerror-override.c (strerror_override): ...to new file. * lib/strerror-override.h: Add prototype. * lib/strerror-impl.h: Delete. * lib/strerror.c (strerror): New implementation. * modules/errno (Files): Add new files. (configure.ac): Compile new file as appropriate. * modules/strerror (Files): Drop unused file. (Depends-on): Drop strerror_r-posix. * MODULES.html.sh: Document strerror_r-posix. Requested by Sam Steingold. Signed-off-by: Eric Blake <eblake@redhat.com>