diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2022-08-23 19:42:51 +0200 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2022-09-14 11:08:55 +0200 |
commit | 868beb15ae02c352005a2df8857f4ebb9bd758fd (patch) | |
tree | 0dc6e6a91c4ef0f131ca82a777e6ac2ad193c399 /gl/m4/vasnprintf.m4 | |
parent | b89aee56964f7d933f2da5f371e32b4d7db9410b (diff) | |
download | monitoring-plugins-868beb1.tar.gz |
Sync with the latest Gnulib code (d27c820595)
Diffstat (limited to 'gl/m4/vasnprintf.m4')
-rw-r--r-- | gl/m4/vasnprintf.m4 | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4 index d730e435..afdece71 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 |
2 | dnl Copyright (C) 2002-2004, 2006-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2002-2004, 2006-2022 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl 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. |
33 | AC_DEFUN([gl_PREREQ_PRINTF_ARGS], | 33 | AC_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], | |||
41 | AC_DEFUN([gl_PREREQ_PRINTF_PARSE], | 40 | AC_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], | |||
56 | AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], | 54 | AC_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' |