+2026-04-29 Bruno Haible <bruno@clisp.org>
+
+ mbrtoc32-regular: Strengthen the configure test.
+ * m4/mbrtoc32-regular.m4: New file.
+ * modules/mbrtoc32-regular (Files): Add it.
+ (configure.ac): Invoke gl_FUNC_MBRTOC32_REGULAR.
+ * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Set gl_cv_func_mbrtoc32_regular.
+ If it's "no" or "guessing no", set REPLACE_MBRTOC32=1.
+
2026-04-28 Bruno Haible <bruno@clisp.org>
error-h: Support multiple gnulib-tool invocations in the same package.
--- /dev/null
+# mbrtoc32-regular.m4
+# serial 1
+dnl Copyright (C) 2026 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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_FUNC_MBRTOC32_REGULAR], [:])
# mbrtoc32.m4
-# serial 21
+# serial 22
dnl Copyright (C) 2014-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
LOCALE_ZH_CN=none
;;
esac
+ m4_ifdef([gl_FUNC_MBRTOC32_REGULAR], [
+ dnl The package requests a regular mbrtoc32 function.
+ dnl glibc's mbrtoc32 function is not regular,
+ dnl due to the zh_HK.BIG5-HKSCS locale, see
+ dnl https://sourceware.org/bugzilla/show_bug.cgi?id=25734
+ dnl https://sourceware.org/bugzilla/show_bug.cgi?id=30611
+ AC_CACHE_CHECK([whether mbrtoc32 is regular],
+ [gl_cv_func_mbrtoc32_regular],
+ [AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_cv_func_mbrtoc32_regular="guessing yes"
+ case "$host_os" in
+ *-gnu* | gnu*)
+ AC_EGREP_CPP([Unlucky], [
+ #include <features.h>
+ #if defined __GNU_LIBRARY__ && __GLIBC__ >= 2
+ Unlucky GNU user
+ #endif
+ ],
+ [gl_cv_func_mbrtoc32_regular="guessing no"],
+ [])
+ ;;
+ esac
+ ])
+ ], [
+ dnl The package does not request a regular mbrtoc32 function.
+ gl_cv_func_mbrtoc32_regular=irrelevant
+ ])
+ case "$gl_cv_func_mbrtoc32_regular" in
+ *no) REPLACE_MBRTOC32=1 ;;
+ esac
fi
if test $HAVE_WORKING_MBRTOC32 = 0; then
REPLACE_MBRTOC32=1