+2019-10-26 Keith Marshall <keith@users.osdn.me>
+
+ 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.
+
2019-10-16 Keith Marshall <keith@users.osdn.me>
Address MinGW-Issue #39677; declare _findclose() only once.
/* User has expressed a preference for C99 conformance...
*/
# undef __mingw_stdio_redirect__
-# ifdef __cplusplus
-/* For 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__
+# if 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.
+ * 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
-# else /* Neither C++ nor __GNUC__ */
+# 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
+
+# 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