Re: Texinfo 7.2.90 build with mingw.org's MinGW: Gnulib

Gavin Smith <[email protected]>
Newsgroups gmane.comp.tex.texinfo.bugs,gmane.comp.lib.gnulib.bugs
Message-ID <aX3dA6HeFpY5Q9Te@orangestar>
On Sat, Jan 31, 2026 at 09:50:28AM +0200, Eli Zaretskii wrote:
> > As Eli's patch showed, it appears to be unnecessary on the MinGW
> > system he is using to include wchar.h in the Gnulib wchar.h.
> 
> You mean, include wchar.h in the Gnulib wctype.h, right?

Sorry, I found them hard to keep straight.

> > Another idea is, that since the problem comes about when including from
> > system wchar.h, that is included from Gnulib wchar.h, some symbol could
> > be defined in Gnulib wchar.h before including <ctype.h>.  The Gnulib
> > include guard symbol _GL_WCTYPE_H isn't defined until after wchar.h is
> > included but there could be another one.
> 
> This won't work, because Gnulib wchar.h does NOT include wctype.h.

> >  In file included from ./wctype.h:56,
> >                   from d:\usr\include\wchar.h:62,
> >                   from ./wchar.h:77,
> >                   from btowc.c:21:
> >      ./wchar.h:1135:10: error: unknown type name 'mbstate_t'

Here the chain of inclusions goes:

btowc.c -> ./wchar.h => d:\usr\include\wchar.h => ./wctype.h => ./wchar.h

Whatever is #defined in ./wchar.h before d:\usr\include\wchar.h is
included would be visible in ./wctype.h.  Hence if its not possible
to detect that we are inside the system wchar.h (d:\usr\include\wchar.h)
by checking defined symbols, it would still be possible if we were being
included from Gnulib wchar.h indirectly.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.