]> Savannah Git Hosting - gnulib.git/commitdiff
mbszero: Fix for Minix.
authorBruno Haible <bruno@clisp.org>
Mon, 17 Jul 2023 16:56:19 +0000 (18:56 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 17 Jul 2023 16:56:19 +0000 (18:56 +0200)
* lib/wchar.in.h: (_GL_MBSTATE_INIT_SIZE): Don't define on Minix.
(_GL_MBSTATE_ZERO_SIZE): Define to 4 on Minix.

ChangeLog
lib/wchar.in.h

index b762e3779af572078b4ed6e13adfafd4951959ef..5ec78e6bd484e60fc856de3ccdc3d6dabcb0a52e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-07-17  Bruno Haible  <bruno@clisp.org>
+
+       mbszero: Fix for Minix.
+       * lib/wchar.in.h: (_GL_MBSTATE_INIT_SIZE): Don't define on Minix.
+       (_GL_MBSTATE_ZERO_SIZE): Define to 4 on Minix.
+
 2023-07-17  Bruno Haible  <bruno@clisp.org>
 
        mbszero: Source code tweaks.
index 430fa6fcec6c69e28f6eccf7e5c0ccb3145679a4..510f2025372986cae16017a6d5eaa3d640403fb7 100644 (file)
@@ -451,8 +451,9 @@ _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
    lib/libc/citrus/citrus_*.c.  */
 /* File           INIT_SIZE  ZERO_SIZE
    citrus_none.c      0          0 */
-#  define _GL_MBSTATE_INIT_SIZE 1
-#  define _GL_MBSTATE_ZERO_SIZE 1
+/* But 1 is not the correct value for _GL_MBSTATE_ZERO_SIZE: we get test
+   failures for values < 4.  */
+#  define _GL_MBSTATE_ZERO_SIZE 4
 # elif defined __sun                                      /* Solaris */
 /* On Solaris, mbstate_t is defined in <wchar_impl.h>.
    It is an opaque aligned 24-byte or 32-byte struct, of which at most the first