-# strndup.m4 serial 17
-dnl Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc.
+# strndup.m4 serial 18
+dnl Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works],
[AC_RUN_IFELSE([
AC_LANG_PROGRAM([[#include <string.h>
- #include <stdlib.h>]], [[
+ #include <stdlib.h>]], [[
#ifndef HAVE_DECL_STRNDUP
extern char *strndup (const char *, size_t);
#endif
return s[13] != '\0';]])],
[gl_cv_func_strndup_works=yes],
[gl_cv_func_strndup_works=no],
- [case $host_os in
- aix*) gl_cv_func_strndup_works="guessing no";;
- *) gl_cv_func_strndup_works="guessing yes";;
- esac])])
+ [
+changequote(,)dnl
+ case $host_os in
+ aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
+ *) gl_cv_func_strndup_works="guessing yes";;
+ esac
+changequote([,])dnl
+ ])])
case $gl_cv_func_strndup_works in
*no)
REPLACE_STRNDUP=1