summaryrefslogtreecommitdiffstats
path: root/gl/m4/vasnprintf.m4
diff options
context:
space:
mode:
authorLorenz <12514511+RincewindsHat@users.noreply.github.com>2023-03-27 10:34:19 (GMT)
committerGitHub <noreply@github.com>2023-03-27 10:34:19 (GMT)
commitbbc97d57f7f9e0a49fea78c02861c444fe95d46a (patch)
treec8956bbbe9b73e37d261735699a82cccaacea0db /gl/m4/vasnprintf.m4
parent917dba07fded8ef04967183a4c0443b5cce2db82 (diff)
parent482aa6c7fe86d7a899e4888d14149f1ccd5401fd (diff)
downloadmonitoring-plugins-bbc97d57f7f9e0a49fea78c02861c444fe95d46a.tar.gz
Merge branch 'master' into dev/check_ssh-patches
Diffstat (limited to 'gl/m4/vasnprintf.m4')
-rw-r--r--gl/m4/vasnprintf.m417
1 files changed, 12 insertions, 5 deletions
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4
index d730e43..6361c84 100644
--- a/gl/m4/vasnprintf.m4
+++ b/gl/m4/vasnprintf.m4
@@ -1,5 +1,5 @@
1# vasnprintf.m4 serial 36 1# vasnprintf.m4 serial 38
2dnl Copyright (C) 2002-2004, 2006-2013 Free Software Foundation, Inc. 2dnl Copyright (C) 2002-2004, 2006-2023 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -32,7 +32,6 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
32# Prerequisites of lib/printf-args.h, lib/printf-args.c. 32# Prerequisites of lib/printf-args.h, lib/printf-args.c.
33AC_DEFUN([gl_PREREQ_PRINTF_ARGS], 33AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
34[ 34[
35 AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
36 AC_REQUIRE([gt_TYPE_WCHAR_T]) 35 AC_REQUIRE([gt_TYPE_WCHAR_T])
37 AC_REQUIRE([gt_TYPE_WINT_T]) 36 AC_REQUIRE([gt_TYPE_WINT_T])
38]) 37])
@@ -41,7 +40,6 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
41AC_DEFUN([gl_PREREQ_PRINTF_PARSE], 40AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
42[ 41[
43 AC_REQUIRE([gl_FEATURES_H]) 42 AC_REQUIRE([gl_FEATURES_H])
44 AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
45 AC_REQUIRE([gt_TYPE_WCHAR_T]) 43 AC_REQUIRE([gt_TYPE_WCHAR_T])
46 AC_REQUIRE([gt_TYPE_WINT_T]) 44 AC_REQUIRE([gt_TYPE_WINT_T])
47 AC_REQUIRE([AC_TYPE_SIZE_T]) 45 AC_REQUIRE([AC_TYPE_SIZE_T])
@@ -56,7 +54,6 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
56AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], 54AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
57[ 55[
58 AC_REQUIRE([AC_FUNC_ALLOCA]) 56 AC_REQUIRE([AC_FUNC_ALLOCA])
59 AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
60 AC_REQUIRE([gt_TYPE_WCHAR_T]) 57 AC_REQUIRE([gt_TYPE_WCHAR_T])
61 AC_REQUIRE([gt_TYPE_WINT_T]) 58 AC_REQUIRE([gt_TYPE_WINT_T])
62 AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) 59 AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
@@ -77,6 +74,16 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
77 if the buffer had been large enough.]) 74 if the buffer had been large enough.])
78 ;; 75 ;;
79 esac 76 esac
77 dnl Additionally, the use of %n can be eliminated by assuming that snprintf
78 dnl always produces NUL-terminated strings (no truncation).
79 AC_REQUIRE([gl_SNPRINTF_TRUNCATION_C99])
80 case "$gl_cv_func_snprintf_truncation_c99" in
81 *yes)
82 AC_DEFINE([HAVE_SNPRINTF_TRUNCATION_C99], [1],
83 [Define if the string produced by the snprintf function is always NUL
84 terminated.])
85 ;;
86 esac
80]) 87])
81 88
82# Extra prerequisites of lib/vasnprintf.c for supporting 'long double' 89# Extra prerequisites of lib/vasnprintf.c for supporting 'long double'