X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=m4%2Fstrndup.m4;h=969e3191a40fbec0ea2f6319d9ff5b560660308f;hb=c8228c7d1f864908fd64cd47eefb418e419da549;hp=f8ea8f2ca774ed249dc9cc7489eeb656f8bce35b;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=pspp diff --git a/m4/strndup.m4 b/m4/strndup.m4 index f8ea8f2ca7..969e3191a4 100644 --- a/m4/strndup.m4 +++ b/m4/strndup.m4 @@ -1,5 +1,5 @@ -# strndup.m4 serial 17 -dnl Copyright (C) 2002-2003, 2005-2009 Free Software Foundation, Inc. +# strndup.m4 serial 19 +dnl Copyright (C) 2002-2003, 2005-2011 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. @@ -18,6 +18,7 @@ AC_DEFUN([gl_FUNC_STRNDUP], fi if test $ac_cv_func_strndup = yes; then + HAVE_STRNDUP=1 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works], [AC_RUN_IFELSE([ @@ -33,17 +34,18 @@ AC_DEFUN([gl_FUNC_STRNDUP], 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 - AC_LIBOBJ([strndup]) - ;; + *no) REPLACE_STRNDUP=1 ;; esac else - AC_LIBOBJ([strndup]) + HAVE_STRNDUP=0 fi ])