From: Bruno Haible Date: Mon, 17 Jul 2023 16:56:19 +0000 (+0200) Subject: mbszero: Fix for Minix. X-Git-Tag: v1.0~1087 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=d261ea8b1965471c3a26ea957f6a441318f6d68c;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index b762e3779a..5ec78e6bd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-07-17 Bruno Haible + + 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 mbszero: Source code tweaks. diff --git a/lib/wchar.in.h b/lib/wchar.in.h index 430fa6fcec..510f202537 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -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 . It is an opaque aligned 24-byte or 32-byte struct, of which at most the first