Enable the strndup declaration also when strndup is replaced.
authorBruno Haible <bruno@clisp.org>
Wed, 21 Mar 2007 04:22:35 +0000 (04:22 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 21 Mar 2007 04:22:35 +0000 (04:22 +0000)
ChangeLog
lib/string_.h

index ff95055..2f6da62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-20  Bruno Haible  <bruno@clisp.org>
+
+       * lib/string_.h (strndup): Enable declaration also if ! HAVE_STRNDUP.
+       Needed on AIX 5.1. Reported by Matthew Woehlke.
+
 2007-03-19  Paul Eggert  <eggert@cs.ucla.edu>
 
        Suggestions by Bruno Haible:
index 483c9fc..b50523c 100644 (file)
@@ -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