summaryrefslogtreecommitdiffstats
path: root/m4/mbsrtowcs.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:55:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:55:47 +0000
commitcd10ccf4d1b4671883a0d45f6769947a6cdb45d0 (patch)
treeb14481899a2c6c4dd53beed82f0f61c6f77254d1 /m4/mbsrtowcs.m4
parentAdding upstream version 1.21.4. (diff)
downloadwget-upstream/1.24.5.tar.xz
wget-upstream/1.24.5.zip
Adding upstream version 1.24.5.upstream/1.24.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--m4/mbsrtowcs.m426
1 files changed, 16 insertions, 10 deletions
diff --git a/m4/mbsrtowcs.m4 b/m4/mbsrtowcs.m4
index 4f2e88c..84ac0b7 100644
--- a/m4/mbsrtowcs.m4
+++ b/m4/mbsrtowcs.m4
@@ -1,5 +1,5 @@
-# mbsrtowcs.m4 serial 15
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+# mbsrtowcs.m4 serial 17
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -61,10 +61,12 @@ AC_DEFUN([gl_MBSRTOWCS_WORKS],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on HP-UX, Solaris, mingw.
- hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
+ # Guess no on HP-UX, Solaris, mingw.
+ hpux* | solaris* | mingw* | windows*)
+ gl_cv_func_mbsrtowcs_works="guessing no" ;;
+ # Guess yes otherwise.
+ *)
+ gl_cv_func_mbsrtowcs_works="guessing yes" ;;
esac
changequote([,])dnl
if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
@@ -78,7 +80,8 @@ int main ()
int result = 0;
/* Test whether the function supports a NULL destination argument.
This fails on native Windows. */
- if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ if (strcmp ("$LOCALE_FR", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
{
const char input[] = "\337er";
const char *src = input;
@@ -91,7 +94,8 @@ int main ()
}
/* Test whether the function works when started with a conversion state
in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
{
const char input[] = "B\303\274\303\237er";
mbstate_t state;
@@ -105,7 +109,8 @@ int main ()
result |= 2;
}
}
- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
{
const char input[] = "<\306\374\313\334\270\354>";
mbstate_t state;
@@ -119,7 +124,8 @@ int main ()
result |= 4;
}
}
- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
{
const char input[] = "B\250\271\201\060\211\070er";
mbstate_t state;