From cbb4401a52ac870ccfe0fbc1e1503e4741ca8fd5 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 21 Mar 2007 04:22:35 +0000 Subject: [PATCH] Enable the strndup declaration also when strndup is replaced. --- ChangeLog | 5 +++++ lib/string_.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff950559da..2f6da625a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-20 Bruno Haible + + * lib/string_.h (strndup): Enable declaration also if ! HAVE_STRNDUP. + Needed on AIX 5.1. Reported by Matthew Woehlke. + 2007-03-19 Paul Eggert Suggestions by Bruno Haible: diff --git a/lib/string_.h b/lib/string_.h index 483c9fc3ff..b50523cce0 100644 --- a/lib/string_.h +++ b/lib/string_.h @@ -192,9 +192,9 @@ extern char *strdup (char const *__s); # if ! @HAVE_STRNDUP@ # undef strndup # define strndup rpl_strndup -# if ! @HAVE_DECL_STRNDUP@ +# endif +# if ! @HAVE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@ extern char *strndup (char const *__string, size_t __n); -# endif # endif #elif defined GNULIB_POSIXCHECK # undef strndup -- 2.30.2