summaryrefslogtreecommitdiff
path: root/m4/mbrtoc32.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-01-21 01:55:50 +0100
committerBruno Haible <bruno@clisp.org>2020-01-21 01:55:50 +0100
commit49c6f78c8b55f5d876ba499fdcd60a13661b49b7 (patch)
tree168152dcd375351699d22df0185ef7c7e85881d5 /m4/mbrtoc32.m4
parentdbb301ad31ad703030a483cd3d0ca8de5e817fb9 (diff)
downloadgnulib-49c6f78c8b55f5d876ba499fdcd60a13661b49b7.tar.gz
mbrtoc32: Add note about FreeBSD 12.
* m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Guess no also on FreeBSD. * doc/posix-functions/mbrtoc32.texi: Mention that FreeBSD 12 is also affected.
Diffstat (limited to 'm4/mbrtoc32.m4')
-rw-r--r--m4/mbrtoc32.m418
1 files changed, 11 insertions, 7 deletions
diff --git a/m4/mbrtoc32.m4 b/m4/mbrtoc32.m4
index 3dee9006e1..a5dc51a7a0 100644
--- a/m4/mbrtoc32.m4
+++ b/m4/mbrtoc32.m4
@@ -1,4 +1,4 @@
-# mbrtoc32.m4 serial 2
+# mbrtoc32.m4 serial 3
dnl Copyright (C) 2014-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -136,10 +136,14 @@ AC_DEFUN([gl_MBRTOC32_SANITYCHECK],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on Solaris, native Windows.
- solaris* | mingw*) gl_cv_func_mbrtoc32_sanitycheck="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbrtoc32_sanitycheck="guessing yes" ;;
+ # Guess no on FreeBSD, Solaris, native Windows.
+ freebsd* | solaris* | mingw*)
+ gl_cv_func_mbrtoc32_sanitycheck="guessing no"
+ ;;
+ # Guess yes otherwise.
+ *)
+ gl_cv_func_mbrtoc32_sanitycheck="guessing yes"
+ ;;
esac
changequote([,])dnl
if test $LOCALE_FR != none || test $LOCALE_ZH_CN != none; then
@@ -176,8 +180,8 @@ int main ()
result |= 1;
}
}
- /* This fails on Solaris 11.4:
- mbrtoc32 returns (size_t)-1.
+ /* This fails on FreeBSD 12 and Solaris 11.4:
+ mbrtoc32 returns (size_t)-2 or (size_t)-1.
mbrtowc returns 4 (correct). */
if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
{