On Fri, Feb 27, 2026 at 11:48:03AM +0100, Bruno Haible wrote:
> Eli Zaretskii wrote on 2026-02-08:
> > > https://alpha.gnu.org/gnu/texinfo/texinfo-7.2.91.tar.xz
> > 
> > Thanks, this builds cleanly with mingw.org's MinGW, with a single
> > problem in Gnulib's wctype.h.  It is the same problem as in the
> > previous pretest, since this Gnulib header was not changed.  For the
> > record, I fixed it locally like this:

...

> Good to know that this works. Since this is very fragile stuff, I prefer
> adding an 'defined __MINGW32__' guard, so as to not affect other platforms.

Thanks for working on the fix.  I will apply the diff you sent, without
making any other gnulib updates before the release, for stability (as there
has already been a lot of testing with the current version of gnulib code).

The current gnulib checkouts in Texinfo date to 2026-02-03.

It will get updated automatically in the future when we update gnulib.


> 2026-02-27  Bruno Haible  <[email protected]>
> 
>       wctype-h: Try to fix error regarding mbstate_t on very old mingw.
>       Reported by Eli Zaretskii, see
>       <https://lists.gnu.org/archive/html/bug-gnulib/2026-01/msg00206.html>.
>       Based on proposed patch at
>       <https://lists.gnu.org/archive/html/bug-gnulib/2026-02/msg00043.html>.
>       * lib/wctype.in.h: Don't include <wchar.h> on mingw when it has already
>       been at least partially processed.
> 
> diff --git a/lib/wctype.in.h b/lib/wctype.in.h
> index 15f310ce91..6a3648dcd0 100644
> --- a/lib/wctype.in.h
> +++ b/lib/wctype.in.h
> @@ -50,16 +50,19 @@
>   #error "Please include config.h first."
>  #endif
>  
> -#if @HAVE_WINT_T@
> -/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */
> +/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
> +   But don't do it in very old mingw, when <wchar.h> is already partially
> +   processed.  */
> +#if @HAVE_WINT_T@ && !(defined __MINGW32__ && defined _WCHAR_H)
>  # include <wchar.h>
>  #endif
>  
>  /* Native Windows (mingw, MSVC) have declarations of towupper, towlower, and
>     isw* functions in <ctype.h>, <wchar.h> as well as in <wctype.h>.  Include
>     <ctype.h>, <wchar.h> in advance to avoid rpl_ prefix being added to the
> -   declarations.  */
> -#if defined _WIN32 && ! defined __CYGWIN__
> +   declarations.  But don't do it in very old mingw, when <wchar.h> is 
> already
> +   partially processed.  */
> +#if defined _WIN32 && !defined __CYGWIN__ && !(defined __MINGW32__ && 
> defined _WCHAR_H)
>  # include <ctype.h>
>  # include <wchar.h>
>  #endif
> 
> 
> 

Reply via email to