summaryrefslogtreecommitdiff
path: root/lib/argp-help.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-05-29 14:57:40 +0200
committerBruno Haible <bruno@clisp.org>2011-05-29 14:57:40 +0200
commit3f15062a8afd23e32adebb54ebc92fee05011645 (patch)
treef811c90b4afcd1060680beb410f4b2ed693336e1 /lib/argp-help.c
parentfdc9e6c9f8cf6afe33a6fa114c536750f16b459b (diff)
downloadgnulib-3f15062a8afd23e32adebb54ebc92fee05011645.tar.gz
argp: Allow coexistence with strerror_r-posix module.
* lib/argp-help.c (__argp_failure): If strerror_r is defined as a macro (either to __xpg_strerror_r by glibc's <string.h> or to rpl_strerror_r by gnulib's <string.h> replacement), assume it has the POSIX signature, not the glibc signature.
Diffstat (limited to 'lib/argp-help.c')
-rw-r--r--lib/argp-help.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/argp-help.c b/lib/argp-help.c
index 7993794718..0cc5838583 100644
--- a/lib/argp-help.c
+++ b/lib/argp-help.c
@@ -1917,7 +1917,7 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
char const *s = NULL;
putc_unlocked (':', stream);
putc_unlocked (' ', stream);
-#if _LIBC || (HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P)
+#if _LIBC || (HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P && !defined strerror_r)
s = __strerror_r (errnum, buf, sizeof buf);
#elif HAVE_DECL_STRERROR_R
if (__strerror_r (errnum, buf, sizeof buf) == 0)