]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
stdio-windows: fix <stdarg.h> include position
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 6 Nov 2025 22:32:10 +0000 (14:32 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 6 Nov 2025 22:32:10 +0000 (14:32 -0800)
Problem reported by Andy Moreton in:
https://lists.gnu.org/r/bug-gnulib/2025-11/msg00059.html
* lib/stdio-consolesafe.c [__MINGW32__ && __USE_MINGW_ANSI_STDIO]:
Include <stdarg.h> even if HAVE_VASPRINTF

ChangeLog
lib/stdio-consolesafe.c

index e40604e420a4ad5740dd019e23d82227c4182390..f3a5d317fdc467fd8603f8fd7b710560aba6c22f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-11-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       stdio-windows: fix <stdarg.h> include position
+       Problem reported by Andy Moreton in:
+       https://lists.gnu.org/r/bug-gnulib/2025-11/msg00059.html
+       * lib/stdio-consolesafe.c [__MINGW32__ && __USE_MINGW_ANSI_STDIO]:
+       Include <stdarg.h> even if HAVE_VASPRINTF
+
 2025-11-06  Bruno Haible  <bruno@clisp.org>
 
        posix_spawn-internal: Don't use vfork() on Solaris/SPARC.
index b5ca8cc0125d2ff7e0fd0c123293f4955dda51a2..80561a6da4ee4112f8b196ff9adb55bd0d3271fa 100644 (file)
@@ -74,11 +74,11 @@ gl_consolesafe_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *fp)
 #if defined __MINGW32__ && __USE_MINGW_ANSI_STDIO
 
 # include "fseterr.h"
+# include <stdarg.h>
 
 # if !HAVE_VASPRINTF
 
 #  include <errno.h>
-#  include <stdarg.h>
 
 /* The old mingw (before mingw-w64) does not have the vasprintf function.
    Define a suitable replacement here, that supports the same format