vasnprintf.m4 | vasnprintf.m4 | |||
---|---|---|---|---|
# vasnprintf.m4 serial 31 | # vasnprintf.m4 serial 36 | |||
dnl Copyright (C) 2002-2004, 2006-2010 Free Software Foundation, Inc. | dnl Copyright (C) 2002-2004, 2006-2014 Free Software Foundation, Inc. | |||
dnl This file is free software; the Free Software Foundation | dnl This file is free software; the Free Software Foundation | |||
dnl gives unlimited permission to copy and/or distribute it, | dnl gives unlimited permission to copy and/or distribute it, | |||
dnl with or without modifications, as long as this notice is preserved. | dnl with or without modifications, as long as this notice is preserved. | |||
AC_DEFUN([gl_FUNC_VASNPRINTF], | AC_DEFUN([gl_FUNC_VASNPRINTF], | |||
[ | [ | |||
AC_CHECK_FUNCS_ONCE([vasnprintf]) | AC_CHECK_FUNCS_ONCE([vasnprintf]) | |||
if test $ac_cv_func_vasnprintf = no; then | if test $ac_cv_func_vasnprintf = no; then | |||
gl_REPLACE_VASNPRINTF | gl_REPLACE_VASNPRINTF | |||
fi | fi | |||
skipping to change at line 32 | skipping to change at line 32 | |||
if test $ac_cv_func_vasnprintf = yes; then | if test $ac_cv_func_vasnprintf = yes; then | |||
AC_DEFINE([REPLACE_VASNPRINTF], [1], | AC_DEFINE([REPLACE_VASNPRINTF], [1], | |||
[Define if vasnprintf exists but is overridden by gnulib.]) | [Define if vasnprintf exists but is overridden by gnulib.]) | |||
fi | fi | |||
gl_PREREQ_PRINTF_ARGS | gl_PREREQ_PRINTF_ARGS | |||
gl_PREREQ_PRINTF_PARSE | gl_PREREQ_PRINTF_PARSE | |||
gl_PREREQ_VASNPRINTF | gl_PREREQ_VASNPRINTF | |||
gl_PREREQ_ASNPRINTF | gl_PREREQ_ASNPRINTF | |||
]) | ]) | |||
# Prequisites of lib/printf-args.h, lib/printf-args.c. | # Prerequisites of lib/printf-args.h, lib/printf-args.c. | |||
AC_DEFUN([gl_PREREQ_PRINTF_ARGS], | AC_DEFUN([gl_PREREQ_PRINTF_ARGS], | |||
[ | [ | |||
AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) | AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) | |||
AC_REQUIRE([gt_TYPE_WCHAR_T]) | AC_REQUIRE([gt_TYPE_WCHAR_T]) | |||
AC_REQUIRE([gt_TYPE_WINT_T]) | AC_REQUIRE([gt_TYPE_WINT_T]) | |||
]) | ]) | |||
# Prequisites of lib/printf-parse.h, lib/printf-parse.c. | # Prerequisites of lib/printf-parse.h, lib/printf-parse.c. | |||
AC_DEFUN([gl_PREREQ_PRINTF_PARSE], | AC_DEFUN([gl_PREREQ_PRINTF_PARSE], | |||
[ | [ | |||
AC_REQUIRE([gl_FEATURES_H]) | ||||
AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) | AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) | |||
AC_REQUIRE([gt_TYPE_WCHAR_T]) | AC_REQUIRE([gt_TYPE_WCHAR_T]) | |||
AC_REQUIRE([gt_TYPE_WINT_T]) | AC_REQUIRE([gt_TYPE_WINT_T]) | |||
AC_REQUIRE([AC_TYPE_SIZE_T]) | AC_REQUIRE([AC_TYPE_SIZE_T]) | |||
AC_CHECK_TYPE([ptrdiff_t], , | AC_CHECK_TYPE([ptrdiff_t], , | |||
[AC_DEFINE([ptrdiff_t], [long], | [AC_DEFINE([ptrdiff_t], [long], | |||
[Define as the type of the result of subtracting two pointers, if th e system doesn't define it.]) | [Define as the type of the result of subtracting two pointers, if th e system doesn't define it.]) | |||
]) | ]) | |||
AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) | AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) | |||
]) | ]) | |||
# Prerequisites of lib/vasnprintf.c. | # Prerequisites of lib/vasnprintf.c. | |||
AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], | AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], | |||
[ | [ | |||
AC_REQUIRE([AC_C_INLINE]) | ||||
AC_REQUIRE([AC_FUNC_ALLOCA]) | AC_REQUIRE([AC_FUNC_ALLOCA]) | |||
AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) | AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) | |||
AC_REQUIRE([gt_TYPE_WCHAR_T]) | AC_REQUIRE([gt_TYPE_WCHAR_T]) | |||
AC_REQUIRE([gt_TYPE_WINT_T]) | AC_REQUIRE([gt_TYPE_WINT_T]) | |||
AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) | AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) | |||
dnl Use the _snprintf function only if it is declared (because on NetBSD it | dnl Use the _snprintf function only if it is declared (because on NetBSD it | |||
dnl is defined as a weak alias of snprintf; we prefer to use the latter). | dnl is defined as a weak alias of snprintf; we prefer to use the latter). | |||
AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>]) | AC_CHECK_DECLS([_snprintf], , , [[#include <stdio.h>]]) | |||
dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization | ||||
dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE. | ||||
AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) | ||||
dnl We can avoid a lot of code by assuming that snprintf's return value | dnl We can avoid a lot of code by assuming that snprintf's return value | |||
dnl conforms to ISO C99. So check that. | dnl conforms to ISO C99. So check that. | |||
AC_REQUIRE([gl_SNPRINTF_RETVAL_C99]) | AC_REQUIRE([gl_SNPRINTF_RETVAL_C99]) | |||
case "$gl_cv_func_snprintf_retval_c99" in | case "$gl_cv_func_snprintf_retval_c99" in | |||
*yes) | *yes) | |||
AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1], | AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1], | |||
[Define if the return value of the snprintf function is the number of | [Define if the return value of the snprintf function is the number of | |||
of bytes (excluding the terminating NUL) that would have been prod uced | of bytes (excluding the terminating NUL) that would have been prod uced | |||
if the buffer had been large enough.]) | if the buffer had been large enough.]) | |||
;; | ;; | |||
End of changes. 6 change blocks. | ||||
6 lines changed or deleted | 9 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |