Mercurial > gnulib
changeset 38493:238ae8192e65
Fix conflict between strerror_r-posix module and AC_FUNC_STRERROR_R.
* modules/strerror_r-posix (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/error.c: Test GNULIB_STRERROR_R_POSIX before testing
HAVE_DECL_STRERROR_R, HAVE_STRERROR_R, or STRERROR_R_CHAR_P.
* lib/argp-help.c (__argp_failure): Likewise.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 23 Apr 2017 19:02:08 +0200 |
parents | 517b19e730f7 |
children | 768a739698d5 |
files | ChangeLog lib/argp-help.c lib/error.c modules/strerror_r-posix |
diffstat | 4 files changed, 17 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Apr 23 18:27:44 2017 +0200 +++ b/ChangeLog Sun Apr 23 19:02:08 2017 +0200 @@ -1,3 +1,11 @@ +2017-04-23 Bruno Haible <bruno@clisp.org> + + Fix conflict between strerror_r-posix module and AC_FUNC_STRERROR_R. + * modules/strerror_r-posix (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/error.c: Test GNULIB_STRERROR_R_POSIX before testing + HAVE_DECL_STRERROR_R, HAVE_STRERROR_R, or STRERROR_R_CHAR_P. + * lib/argp-help.c (__argp_failure): Likewise. + 2017-04-23 Bruno Haible <bruno@clisp.org> strerror_r-posix: Revert commits from 2016-10-16,2016-11-04,2016-11-14.
--- a/lib/argp-help.c Sun Apr 23 18:27:44 2017 +0200 +++ b/lib/argp-help.c Sun Apr 23 19:02:08 2017 +0200 @@ -1873,8 +1873,8 @@ char const *s = NULL; putc_unlocked (':', stream); putc_unlocked (' ', stream); -# if HAVE_DECL_STRERROR_R -# if STRERROR_R_CHAR_P +# if GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R +# if GNULIB_STRERROR_R_POSIX || STRERROR_R_CHAR_P s = __strerror_r (errnum, buf, sizeof buf); # else if (__strerror_r (errnum, buf, sizeof buf) == 0)
--- a/lib/error.c Sun Apr 23 18:27:44 2017 +0200 +++ b/lib/error.c Sun Apr 23 19:02:08 2017 +0200 @@ -104,7 +104,7 @@ /* The gnulib override of fcntl is not needed in this file. */ # undef fcntl -# if !HAVE_DECL_STRERROR_R +# if !(GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R) # ifndef HAVE_DECL_STRERROR_R "this configure-time declaration test was not run" # endif @@ -117,9 +117,9 @@ #define program_name getprogname () -# if HAVE_STRERROR_R || defined strerror_r +# if GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r -# endif /* HAVE_STRERROR_R || defined strerror_r */ +# endif /* GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r */ #endif /* not _LIBC */ #if !_LIBC @@ -172,9 +172,9 @@ { char const *s; -#if defined HAVE_STRERROR_R || _LIBC +#if _LIBC || GNULIB_STRERROR_R_POSIX || defined HAVE_STRERROR_R char errbuf[1024]; -# if _LIBC || STRERROR_R_CHAR_P +# if _LIBC || GNULIB_STRERROR_R_POSIX || STRERROR_R_CHAR_P s = __strerror_r (errnum, errbuf, sizeof errbuf); # else if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)