[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: strerror_r breakage on mingw
From: |
Bruno Haible |
Subject: |
Re: strerror_r breakage on mingw |
Date: |
Sat, 29 Apr 2017 23:01:54 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-75-generic; KDE/5.18.0; x86_64; ; ) |
> 2017-04-23 Bruno Haible <address@hidden>
>
> 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.
Oops, there was a mistake in this patch. Fixing it as follows:
2017-04-29 Bruno Haible <address@hidden>
error: Fix mistake in 2017-04-23 commit.
* lib/error.c (print_errno_message): If GNULIB_STRERROR_R_POSIX is set,
assume that strerror_r returns 'int', not 'char *'.
--- a/lib/error.c
+++ b/lib/error.c
@@ -174,7 +174,7 @@ print_errno_message (int errnum)
#if _LIBC || GNULIB_STRERROR_R_POSIX || defined HAVE_STRERROR_R
char errbuf[1024];
-# if _LIBC || GNULIB_STRERROR_R_POSIX || 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)