> From: Bruno Haible <[email protected]> > Date: Sat, 24 Jan 2026 23:57:12 +0100 > > Eli Zaretskii wrote in > <https://lists.gnu.org/archive/html/bug-texinfo/2026-01/msg00099.html>, > about building GNU texinfo with mingw.org's old dead mingw: > > > > Another Gnulib-related problem was with stdio-consolesafe.c: > > > > > > gcc -DHAVE_CONFIG_H -I. -I../.. -Id:/usr/include -Wno-cast-qual > > > -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef > > > -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion > > > -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion > > > -Wno-type-limits -Wno-unused-const-variable > > > -Wno-unsuffixed-float-constants -Wno-error -O2 -gdwarf-4 -g3 -MT > > > libgnu_a-stdio-consolesafe.o -MD -MP -MF > > > .deps/libgnu_a-stdio-consolesafe.Tpo -c -o libgnu_a-stdio-consolesafe.o > > > `test -f 'stdio-consolesafe.c' || echo './'`stdio-consolesafe.c > > > stdio-consolesafe.c:88:1: error: static declaration of 'vasprintf' > > > follows non-static declaration > > > 88 | vasprintf (char **resultp, const char *format, va_list args) > > > | ^~~~~~~~~ > > > In file included from stdio-consolesafe.c:20: > > > ./stdio.h:2346:1: note: previous declaration of 'vasprintf' was here > > > 2346 | _GL_FUNCDECL_SYS (vasprintf, int, > > > | ^~~~~~~~~~~~~~~~ > > > > > > I originally just removed the 'static' qualifier from the version of > > > vasprintf included in stdio-consolesafe.c, but that failed the link > > > step further down the line, because Gnulib also includes vasprintf.c, > > > which the MinGW build compiles and links against. So, again as a > > > temporary kludge, I renamed the vasprintf in stdio-consolesafe.c to > > > rpl_vasprintf, and that solved the compilation and link problems. > > I see: The line > # if !HAVE_VASPRINTF > was meant to avoid a collision between this vasprintf and the global vasprintf > from mingw. But here, the global vasprintf comes from gnulib, not from mingw. > > I'm applying this patch, that should fix it.
Thanks.
