]> Savannah Git Hosting - gnulib.git/commitdiff
mbrtoc32: Doc tweak.
authorBruno Haible <bruno@clisp.org>
Wed, 28 Jun 2023 10:35:21 +0000 (12:35 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 28 Jun 2023 16:14:21 +0000 (18:14 +0200)
* doc/posix-functions/mbrtoc32.texi: Mention that mingw and Android have
the empty input bug.
* m4/mbrtoc32.m4 (gl_MBRTOC32_EMPTY_INPUT): Update cross-compilation
guess.

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

index e1d2c81d5f79b4798cebd144121e8a2ef051d9af..44e3f9a6da317eb4595c334490e94a2058a7f5a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-06-28  Bruno Haible  <bruno@clisp.org>
+
+       mbrtoc32: Doc tweak.
+       * doc/posix-functions/mbrtoc32.texi: Mention that mingw and Android have
+       the empty input bug.
+       * m4/mbrtoc32.m4 (gl_MBRTOC32_EMPTY_INPUT): Update cross-compilation
+       guess.
+
 2023-06-28  Bruno Haible  <bruno@clisp.org>
 
        mbrtowc: Doc tweak.
index 91f88bf86f911b39a7dff792a37cc7f44a876ea2..8792a7b11b343933e94eaab16e051a3d07909abb 100644 (file)
@@ -16,13 +16,15 @@ glibc 2.35.
 @item
 This function returns 0 instead of @code{(size_t) -2} when the input
 is empty:
-glibc 2.19,
+glibc 2.19, mingw, Android 11,
 @c https://dev.haiku-os.org/ticket/18350
 Haiku.
 @item
 This function does not recognize multibyte sequences that @code{mbrtowc}
 recognizes on some platforms:
 FreeBSD 13.0, Solaris 11.4, mingw, MSVC 14.
+@c For MSVC this is because it assumes that the input is always UTF-8 encoded.
+@c See https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/mbrtoc16-mbrtoc323
 @end itemize
 
 Portability problems not fixed by Gnulib:
index f5798db4a36dab90836836f080d62d3668ded596..25196039bbc094ef9560337cb8dbf72e1a465a23 100644 (file)
@@ -1,4 +1,4 @@
-# mbrtoc32.m4 serial 16
+# mbrtoc32.m4 serial 17
 dnl Copyright (C) 2014-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -80,6 +80,8 @@ AC_DEFUN([gl_CHECK_FUNC_MBRTOC32],
   fi
 ])
 
+dnl Test whether mbrtoc32 returns the correct value on empty input.
+
 AC_DEFUN([gl_MBRTOC32_EMPTY_INPUT],
 [
   AC_REQUIRE([AC_PROG_CC])
@@ -103,9 +105,13 @@ AC_DEFUN([gl_MBRTOC32_EMPTY_INPUT],
         [gl_cv_func_mbrtoc32_empty_input=yes],
         [gl_cv_func_mbrtoc32_empty_input=no],
         [case "$host_os" in
-                          # Guess no on glibc systems.
-           *-gnu* | gnu*) gl_cv_func_mbrtoc32_empty_input="guessing no" ;;
-           *)             gl_cv_func_mbrtoc32_empty_input="guessing yes" ;;
+                            # Guess no on glibc systems.
+           *-gnu* | gnu*)   gl_cv_func_mbrtoc32_empty_input="guessing no" ;;
+                            # Guess no on Android.
+           linux*-android*) gl_cv_func_mbrtoc32_empty_input="guessing no" ;;
+                            # Guess no on native Windows.
+           mingw*)          gl_cv_func_mbrtoc32_empty_input="guessing no" ;;
+           *)               gl_cv_func_mbrtoc32_empty_input="guessing yes" ;;
          esac
         ])
     ])