]> Savannah Git Hosting - gnulib.git/commitdiff
argp: Fix mistake in 2017-04-23 commit.
authorBruno Haible <bruno@clisp.org>
Thu, 4 May 2017 22:09:48 +0000 (00:09 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 4 May 2017 22:09:48 +0000 (00:09 +0200)
* lib/argp-help.c (__argp_failure): If GNULIB_STRERROR_R_POSIX is set,
assume that strerror_r returns 'int', not 'char *'.

ChangeLog
lib/argp-help.c

index 90527b8bd4865e7b39b93659b93577f95e712a1d..4605c8e786e53ff15cb1febbf98624c12c22f10c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-05-04 Bruno Haible  <bruno@clisp.org>
+
+       argp: Fix mistake in 2017-04-23 commit.
+       * lib/argp-help.c (__argp_failure): If GNULIB_STRERROR_R_POSIX is set,
+       assume that strerror_r returns 'int', not 'char *'.
+
 2017-05-04  Reuben Thomas  <rrt@sc3d.org>
 
        argp: Fix typo.
index 05ab474575c46586ba70b0c1067cb60a62c7f876..06329606a72a0e6e553ae36bd37bcfac135922b7 100644 (file)
@@ -1874,7 +1874,7 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
               putc_unlocked (':', stream);
               putc_unlocked (' ', stream);
 # if GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R
-#  if GNULIB_STRERROR_R_POSIX || STRERROR_R_CHAR_P
+#  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)