From 13e14a6bfd9f29cbfeab0c5161d2a994f97532e7 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 26 Mar 2026 12:53:53 +0100 Subject: Update/gnulib 2026 03 (#2247) * Sync with the 202601-stable Gnulib code (4a3650d887) * Ignore more deps stuff in gnulib * Remove autogenerated gnulib files * Ignore more gnulib generated headers --- gl/stdio-consolesafe.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gl/stdio-consolesafe.c') diff --git a/gl/stdio-consolesafe.c b/gl/stdio-consolesafe.c index 80561a6d..f634de13 100644 --- a/gl/stdio-consolesafe.c +++ b/gl/stdio-consolesafe.c @@ -1,5 +1,5 @@ /* msvcrt workarounds. - Copyright (C) 2025 Free Software Foundation, Inc. + Copyright (C) 2025-2026 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -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, @@ -133,8 +136,8 @@ int gl_consolesafe_fprintf (FILE *restrict fp, const char *restrict format, ...) { va_list args; - char *tmpstring; va_start (args, format); + char *tmpstring; int result = vasprintf (&tmpstring, format, args); va_end (args); if (result >= 0) @@ -151,8 +154,8 @@ int gl_consolesafe_printf (const char *restrict format, ...) { va_list args; - char *tmpstring; va_start (args, format); + char *tmpstring; int result = vasprintf (&tmpstring, format, args); va_end (args); if (result >= 0) -- cgit v1.2.3-74-g34f1