* 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>
+
+ 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.
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)
/* 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
#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
{
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)
gl_PREREQ_STRERROR_R
fi
gl_STRING_MODULE_INDICATOR([strerror_r])
+dnl For the modules argp, error.
+gl_MODULE_INDICATOR([strerror_r-posix])
Makefile.am: