+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.
@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:
-# 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,
fi
])
+dnl Test whether mbrtoc32 returns the correct value on empty input.
+
AC_DEFUN([gl_MBRTOC32_EMPTY_INPUT],
[
AC_REQUIRE([AC_PROG_CC])
[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
])
])