# HG changeset patch
# Date 1572082392 -3600
# Parent  4e77488c6712cdb6801ddafddb1eeb9b5a9bfe51
Fix MinGW-Issue #39757; avoid multiple vsnprintf() definitions.

* include/stdio.h [C++] (__mingw_stdio_redirect__): Defer redirection
to in-line definitions applicable for C, when the compiler suite is...
[__GNUC__]: ...this.

diff --git a/mingwrt/include/stdio.h b/mingwrt/include/stdio.h
--- a/mingwrt/include/stdio.h
+++ b/mingwrt/include/stdio.h
@@ -377,30 +377,30 @@ extern unsigned int _mingw_output_format
 
 #if __USE_MINGW_ANSI_STDIO || defined _ISOC99_SOURCE
 /* User has expressed a preference for C99 conformance...
  */
 # undef __mingw_stdio_redirect__
-# ifdef __cplusplus
-/* For C++ we use inline implementations, to avoid interference
+# if defined __GNUC__
+/* FIXME: Is there any GCC version prerequisite here?
+ *
+ * We prefer inline implementations for both C and C++, when we can be
+ * confident that the GNU specific __inline__ mechanism is supported.
+ */
+#  define __mingw_stdio_redirect__  static __inline__ __cdecl __MINGW_NOTHROW
+
+# elif defined __cplusplus
+/* For non-GNU C++ we use inline implementations, to avoid interference
  * with namespace qualification, which may result from using #defines.
  */
 #  define __mingw_stdio_redirect__  inline __cdecl __MINGW_NOTHROW
 
-# elif defined __GNUC__
-/* FIXME: Is there any GCC version prerequisite here?
- *
- * We also prefer inline implementations for C, when we can be confident
- * that the GNU specific __inline__ mechanism is supported.
- */
-#  define __mingw_stdio_redirect__  static __inline__ __cdecl __MINGW_NOTHROW
-
-# else	/* Neither C++ nor __GNUC__ */
+# else	/* Neither GCC, nor non-GNU C++ */
 /* Can't use inlines; fall back on module local static stubs.
  */
 #  define __mingw_stdio_redirect__  static __cdecl __MINGW_NOTHROW
 
-# endif	/* Neither C++ nor __GNUC__ */
+# endif	/* Neither GCC, nor non-GNU C++ */
 #endif	/* __USE_MINGW_ANSI_STDIO || defined _ISOC99_SOURCE */
 
 #if __USE_MINGW_ANSI_STDIO
 /* The MinGW ISO-C conforming implementations of the printf() family
  * of functions are to be used, in place of non-conforming Microsoft