]> Savannah Git Hosting - gnulib.git/commitdiff
mbrtoc32: Add note about FreeBSD 12.
authorBruno Haible <bruno@clisp.org>
Tue, 21 Jan 2020 00:55:50 +0000 (01:55 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 21 Jan 2020 00:55:50 +0000 (01:55 +0100)
* m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Guess no also on FreeBSD.
* doc/posix-functions/mbrtoc32.texi: Mention that FreeBSD 12 is also
affected.

ChangeLog
doc/posix-functions/mbrtoc32.texi
m4/mbrtoc32.m4

index 29ee66869a32bc534b0b519269320382df428ebc..08f05f74c2b5e410108d1baaa5eaf4f5f3302472 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-01-20  Bruno Haible  <bruno@clisp.org>
+
+       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.
+
 2020-01-20  Bruno Haible  <bruno@clisp.org>
 
        unistr/u8-uctomb: Fix warning.
index 9789bef1301afc82e86a98843cc39ea70c208a0e..3151a09fe256c567115db2a8a708eec744aa4ba8 100644 (file)
@@ -20,7 +20,7 @@ glibc 2.19.
 @item
 This function does not recognize multibyte sequences that @code{mbrtowc}
 recognizes on some platforms:
-Solaris 11.4, mingw, MSVC 14.
+FreeBSD 12, Solaris 11.4, mingw, MSVC 14.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 3dee9006e17f089f56b8ff947a7c9f87163001be..a5dc51a7a0b092939a7ed4795c7fd9e4e0e5ec78 100644 (file)
@@ -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)
     {