From: Bruno Haible Date: Sat, 24 Jan 2026 22:56:58 +0000 (+0100) Subject: stdio-windows: Fix compilation error on old mingw. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43d801a0234994cf97f5d7c34a5fb9b23b9be55a;p=thirdparty%2Fgnulib.git stdio-windows: Fix compilation error on old mingw. Reported by Eli Zaretskii in . * lib/stdio-consolesafe.c (local_vasprintf): Renamed from vasprintf. (vasprintf): Define as a macro, not as a function. --- diff --git a/ChangeLog b/ChangeLog index d7f00a1f5e..1f258a8674 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2026-01-24 Bruno Haible + + stdio-windows: Fix compilation error on old mingw. + Reported by Eli Zaretskii in + . + * lib/stdio-consolesafe.c (local_vasprintf): Renamed from vasprintf. + (vasprintf): Define as a macro, not as a function. + 2026-01-24 Bruno Haible selinux-h: Fix compilation errors on Android outside Termux. diff --git a/lib/stdio-consolesafe.c b/lib/stdio-consolesafe.c index c9486f1a32..f634de13ef 100644 --- a/lib/stdio-consolesafe.c +++ b/lib/stdio-consolesafe.c @@ -85,7 +85,7 @@ gl_consolesafe_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *fp) specifiers as the mingw *printf functions. */ static int -vasprintf (char **resultp, const char *format, va_list args) +local_vasprintf (char **resultp, const char *format, va_list args) { /* First try: Use a stack-allocated buffer. */ char buf[2048]; @@ -123,6 +123,9 @@ vasprintf (char **resultp, const char *format, va_list args) return nbytes; } +# undef vasprintf +# define vasprintf local_vasprintf + # endif /* Bypass the functions __mingw_[v][f]printf, that trigger a bug in msvcrt,