summaryrefslogtreecommitdiffstats
path: root/gl/m4/localeconv.m4
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-11-06 08:24:23 (GMT)
committerGitHub <noreply@github.com>2024-11-06 08:24:23 (GMT)
commit9b4df9e50837cc837e113053ba12ee6967d5e6c2 (patch)
treebf989e771579f835bcb49c074637a8e224bcecbc /gl/m4/localeconv.m4
parent94150ae347beb25ac369d5773834ceef7f3736d3 (diff)
parent5be04ec2ceb1df77afbca4fcbf9e92a712612d6f (diff)
downloadmonitoring-plugins-9b4df9e50837cc837e113053ba12ee6967d5e6c2.tar.gz
Merge pull request #2037 from RincewindsHat/update/gnulib-1.0
Sync with the latest Gnulib code (d4ec02b3cc) (gnulib v1.0)
Diffstat (limited to 'gl/m4/localeconv.m4')
-rw-r--r--gl/m4/localeconv.m442
1 files changed, 40 insertions, 2 deletions
diff --git a/gl/m4/localeconv.m4 b/gl/m4/localeconv.m4
index ae225fe..77d5684 100644
--- a/gl/m4/localeconv.m4
+++ b/gl/m4/localeconv.m4
@@ -1,5 +1,6 @@
1# localeconv.m4 serial 1 1# localeconv.m4
2dnl Copyright (C) 2012-2023 Free Software Foundation, Inc. 2# serial 3
3dnl Copyright (C) 2012-2024 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
@@ -8,10 +9,45 @@ AC_DEFUN([gl_FUNC_LOCALECONV],
8[ 9[
9 AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) 10 AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
10 AC_REQUIRE([gl_LOCALE_H]) 11 AC_REQUIRE([gl_LOCALE_H])
12 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
11 13
12 if test $REPLACE_STRUCT_LCONV = 1; then 14 if test $REPLACE_STRUCT_LCONV = 1; then
13 REPLACE_LOCALECONV=1 15 REPLACE_LOCALECONV=1
14 fi 16 fi
17 if test $REPLACE_LOCALECONV = 0; then
18 dnl Test whether fields of type 'char' are filled correctly.
19 dnl This test fails on mingw 5.0.3.
20 AC_CACHE_CHECK([whether localeconv works],
21 [gl_cv_func_localeconv_works],
22 [AC_RUN_IFELSE(
23 [AC_LANG_SOURCE([[
24 #include <locale.h>
25 #include <limits.h>
26 int main ()
27 {
28 struct lconv *l = localeconv ();
29 return l->frac_digits != CHAR_MAX && l->frac_digits < 0;
30 }
31 ]])],
32 [gl_cv_func_localeconv_works=yes],
33 [gl_cv_func_localeconv_works=no],
34 [case "$host_os" in
35 # Guess yes on glibc systems.
36 *-gnu* | gnu*) gl_cv_func_localeconv_works="guessing yes" ;;
37 # Guess yes on musl systems.
38 *-musl* | midipix*) gl_cv_func_localeconv_works="guessing yes" ;;
39 # Guess no on native Windows.
40 mingw* | windows*) gl_cv_func_localeconv_works="guessing no" ;;
41 # If we don't know, obey --enable-cross-guesses.
42 *) gl_cv_func_localeconv_works="$gl_cross_guess_normal" ;;
43 esac
44 ])
45 ])
46 case "$gl_cv_func_localeconv_works" in
47 *yes) ;;
48 *) REPLACE_LOCALECONV=1 ;;
49 esac
50 fi
15]) 51])
16 52
17# Prerequisites of lib/localeconv.c. 53# Prerequisites of lib/localeconv.c.
@@ -19,4 +55,6 @@ AC_DEFUN([gl_PREREQ_LOCALECONV],
19[ 55[
20 AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [], 56 AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [],
21 [[#include <locale.h>]]) 57 [[#include <locale.h>]])
58 AC_CHECK_MEMBERS([struct lconv.int_p_cs_precedes], [], [],
59 [[#include <locale.h>]])
22]) 60])