Bash-4.1 distribution source
This commit is contained in:
parent
89a92869e5
commit
0001803f0b
252 changed files with 51563 additions and 37176 deletions
97
aclocal.m4
vendored
97
aclocal.m4
vendored
|
@ -80,6 +80,9 @@ AC_CACHE_VAL(bash_cv_type_$1,
|
|||
#if HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
#if HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
$2
|
||||
], bash_cv_type_$1=yes, bash_cv_type_$1=no)])
|
||||
AC_MSG_RESULT($bash_cv_type_$1)
|
||||
|
@ -1690,9 +1693,12 @@ AC_CHECK_HEADERS(wchar.h)
|
|||
AC_CHECK_HEADERS(langinfo.h)
|
||||
|
||||
AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN))
|
||||
AC_CHECK_FUNC(mbscasecmp, AC_DEFINE(HAVE_MBSCMP))
|
||||
AC_CHECK_FUNC(mbscmp, AC_DEFINE(HAVE_MBSCMP))
|
||||
AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
|
||||
|
||||
AC_REPLACE_FUNCS(mbschr)
|
||||
|
||||
AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB))
|
||||
AC_CHECK_FUNC(wcscoll, AC_DEFINE(HAVE_WCSCOLL))
|
||||
AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP))
|
||||
|
@ -1753,6 +1759,13 @@ if test $bash_cv_type_wint_t = yes; then
|
|||
AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])
|
||||
fi
|
||||
|
||||
if test "$am_cv_func_iconv" = yes; then
|
||||
OLDLIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBICONV"
|
||||
AC_CHECK_FUNCS(locale_charset)
|
||||
LIBS="$OLDLIBS"
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
|
||||
|
@ -4018,3 +4031,87 @@ AC_DEFUN([BASH_FUNC_FPURGE],
|
|||
AC_CHECK_FUNCS_ONCE([__fpurge])
|
||||
AC_CHECK_DECLS([fpurge], , , [#include <stdio.h>])
|
||||
])
|
||||
|
||||
AC_DEFUN([BASH_FUNC_SNPRINTF],
|
||||
[
|
||||
AC_CHECK_FUNCS_ONCE([snprintf])
|
||||
if test X$ac_cv_func_snprintf = Xyes; then
|
||||
AC_CACHE_CHECK([for standard-conformant snprintf], [bash_cv_func_snprintf],
|
||||
[AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
|
||||
main()
|
||||
{
|
||||
int n;
|
||||
n = snprintf (0, 0, "%s", "0123456");
|
||||
exit(n != 7);
|
||||
}
|
||||
], bash_cv_func_snprintf=yes, bash_cv_func_snprintf=no,
|
||||
[AC_MSG_WARN([cannot check standard snprintf if cross-compiling])
|
||||
bash_cv_func_snprintf=yes]
|
||||
)])
|
||||
if test $bash_cv_func_snprintf = no; then
|
||||
ac_cv_func_snprintf=no
|
||||
fi
|
||||
fi
|
||||
if test $ac_cv_func_snprintf = no; then
|
||||
AC_DEFINE(HAVE_SNPRINTF, 0,
|
||||
[Define if you have a standard-conformant snprintf function.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASH_FUNC_VSNPRINTF],
|
||||
[
|
||||
AC_CHECK_FUNCS_ONCE([vsnprintf])
|
||||
if test X$ac_cv_func_vsnprintf = Xyes; then
|
||||
AC_CACHE_CHECK([for standard-conformant vsnprintf], [bash_cv_func_vsnprintf],
|
||||
[AC_TRY_RUN([
|
||||
#if HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static int
|
||||
#if HAVE_STDARG_H
|
||||
foo(const char *fmt, ...)
|
||||
#else
|
||||
foo(format, va_alist)
|
||||
const char *format;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list args;
|
||||
int n;
|
||||
|
||||
#if HAVE_STDARG_H
|
||||
va_start(args, fmt);
|
||||
#else
|
||||
va_start(args);
|
||||
#endif
|
||||
n = vsnprintf(0, 0, fmt, args);
|
||||
va_end (args);
|
||||
return n;
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
int n;
|
||||
n = foo("%s", "0123456");
|
||||
exit(n != 7);
|
||||
}
|
||||
], bash_cv_func_vsnprintf=yes, bash_cv_func_vsnprintf=no,
|
||||
[AC_MSG_WARN([cannot check standard vsnprintf if cross-compiling])
|
||||
bash_cv_func_vsnprintf=yes]
|
||||
)])
|
||||
if test $bash_cv_func_vsnprintf = no; then
|
||||
ac_cv_func_vsnprintf=no
|
||||
fi
|
||||
fi
|
||||
if test $ac_cv_func_vsnprintf = no; then
|
||||
AC_DEFINE(HAVE_VSNPRINTF, 0,
|
||||
[Define if you have a standard-conformant vsnprintf function.])
|
||||
fi
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue