summaryrefslogtreecommitdiffstats
path: root/gl/m4/wcrtomb.m4
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 15:27:12 (GMT)
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-10-31 15:27:12 (GMT)
commit5be04ec2ceb1df77afbca4fcbf9e92a712612d6f (patch)
tree2b2e1c71dffae827c8e45cd4cccc375093d03486 /gl/m4/wcrtomb.m4
parent6d1d1dac32841d5ca6ee51bb09b30a6c604b17e2 (diff)
downloadmonitoring-plugins-5be04ec2ceb1df77afbca4fcbf9e92a712612d6f.tar.gz
Sync with the latest Gnulib code (d4ec02b3cc)refs/pull/2037/head
Diffstat (limited to 'gl/m4/wcrtomb.m4')
-rw-r--r--gl/m4/wcrtomb.m423
1 files changed, 15 insertions, 8 deletions
diff --git a/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4
index d51b36e..35dff6f 100644
--- a/gl/m4/wcrtomb.m4
+++ b/gl/m4/wcrtomb.m4
@@ -1,5 +1,6 @@
1# wcrtomb.m4 serial 17 1# wcrtomb.m4
2dnl Copyright (C) 2008-2023 Free Software Foundation, Inc. 2# serial 19
3dnl Copyright (C) 2008-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.
@@ -82,9 +83,11 @@ int main ()
82changequote(,)dnl 83changequote(,)dnl
83 case "$host_os" in 84 case "$host_os" in
84 # Guess no on AIX 4, OSF/1, Solaris, native Windows. 85 # Guess no on AIX 4, OSF/1, Solaris, native Windows.
85 aix4* | osf* | solaris* | mingw*) gl_cv_func_wcrtomb_retval="guessing no" ;; 86 aix4* | osf* | solaris* | mingw* | windows*)
87 gl_cv_func_wcrtomb_retval="guessing no" ;;
86 # Guess yes otherwise. 88 # Guess yes otherwise.
87 *) gl_cv_func_wcrtomb_retval="guessing yes" ;; 89 *)
90 gl_cv_func_wcrtomb_retval="guessing yes" ;;
88 esac 91 esac
89changequote([,])dnl 92changequote([,])dnl
90 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then 93 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
@@ -97,12 +100,14 @@ changequote([,])dnl
97int main () 100int main ()
98{ 101{
99 int result = 0; 102 int result = 0;
100 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) 103 if (strcmp ("$LOCALE_FR", "none") != 0
104 && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
101 { 105 {
102 if (wcrtomb (NULL, 0, NULL) != 1) 106 if (wcrtomb (NULL, 0, NULL) != 1)
103 result |= 1; 107 result |= 1;
104 } 108 }
105 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 109 if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
110 && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
106 { 111 {
107 if (wcrtomb (NULL, 0, NULL) != 1) 112 if (wcrtomb (NULL, 0, NULL) != 1)
108 result |= 2; 113 result |= 2;
@@ -113,12 +118,14 @@ int main ()
113 result |= 2; 118 result |= 2;
114 } 119 }
115 } 120 }
116 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) 121 if (strcmp ("$LOCALE_JA", "none") != 0
122 && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
117 { 123 {
118 if (wcrtomb (NULL, 0, NULL) != 1) 124 if (wcrtomb (NULL, 0, NULL) != 1)
119 result |= 4; 125 result |= 4;
120 } 126 }
121 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) 127 if (strcmp ("$LOCALE_ZH_CN", "none") != 0
128 && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
122 { 129 {
123 if (wcrtomb (NULL, 0, NULL) != 1) 130 if (wcrtomb (NULL, 0, NULL) != 1)
124 result |= 8; 131 result |= 8;