Imported Upstream version 1.4.16+git20130902
This commit is contained in:
parent
e76be63abf
commit
e70fb8c051
517 changed files with 44015 additions and 43295 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# strndup.m4 serial 17
|
||||
dnl Copyright (C) 2002-2003, 2005-2010 Free Software Foundation, Inc.
|
||||
# strndup.m4 serial 21
|
||||
dnl Copyright (C) 2002-2003, 2005-2013 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,13 +18,18 @@ 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([
|
||||
AC_LANG_PROGRAM([[#include <string.h>
|
||||
#include <stdlib.h>]], [[
|
||||
#ifndef HAVE_DECL_STRNDUP
|
||||
extern char *strndup (const char *, size_t);
|
||||
#if !HAVE_DECL_STRNDUP
|
||||
extern
|
||||
#ifdef __cplusplus
|
||||
"C"
|
||||
#endif
|
||||
char *strndup (const char *, size_t);
|
||||
#endif
|
||||
char *s;
|
||||
s = strndup ("some longer string", 15);
|
||||
|
|
@ -33,17 +38,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
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue