summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-04-29 23:01:39 +0200
committerBruno Haible <bruno@clisp.org>2017-04-29 23:01:39 +0200
commitf9973ab5540a56ee89888799a6d7a12c9aa603cf (patch)
treeeb85863ed45aeb5b3af1efa8b1720b88a7541346
parentbd48174329ce207aaf37d37c91b68b215216ab2e (diff)
downloadgnulib-f9973ab5540a56ee89888799a6d7a12c9aa603cf.tar.gz
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 *'.
-rw-r--r--ChangeLog6
-rw-r--r--lib/error.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6882eece9e..4e052a710b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2017-04-29 Bruno Haible <bruno@clisp.org>
+ 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 *'.
+
+2017-04-29 Bruno Haible <bruno@clisp.org>
+
stat: Fix time_t values and other problems on native Windows platforms.
* doc/posix-functions/stat.texi: Mention the problem with the Microsoft
implementations of stat().
diff --git a/lib/error.c b/lib/error.c
index feda7208d3..ed9b37a955 100644
--- 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)