]> Savannah Git Hosting - gnulib.git/commitdiff
error: Fix mistake in 2017-04-23 commit.
authorBruno Haible <bruno@clisp.org>
Sat, 29 Apr 2017 21:01:39 +0000 (23:01 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 29 Apr 2017 21:01:39 +0000 (23:01 +0200)
* lib/error.c (print_errno_message): If GNULIB_STRERROR_R_POSIX is set,
assume that strerror_r returns 'int', not 'char *'.

ChangeLog
lib/error.c

index 6882eece9e3b511949dfc63565871caefe9cfb98..4e052a710baa186d577149d9eb10a75e6200938a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
index feda7208d385a3d97e4d53c79a0343f8d2b07d54..ed9b37a9558867996363e105d160358a9f0fcd5b 100644 (file)
@@ -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)