• R/O
  • HTTP
  • SSH
  • HTTPS

mingw-org-wsl: Commit

The MinGW.OSDN Windows System Libraries. Formerly designated as "MinGW.org Windows System Libraries", this encapsulates the "mingwrt" C runtime library extensions, and the "w32api" 32-bit MS-Windows API libraries.

Please note that this project no longer owns the "MinGW.org" domain name; any software which may be distributed from that domain is NOT supported by this project.


Commit MetaInfo

Revision3c7767ef789712844a47d4e5360a65f542753694 (tree)
Time2019-10-26 18:33:12
AuthorKeith Marshall <keith@user...>
CommiterKeith Marshall

Log Message

Fix MinGW-Issue #39757; avoid multiple vsnprintf() definitions.

Change Summary

Incremental Difference

--- a/mingwrt/ChangeLog
+++ b/mingwrt/ChangeLog
@@ -1,3 +1,11 @@
1+2019-10-26 Keith Marshall <keith@users.osdn.me>
2+
3+ Fix MinGW-Issue #39757; avoid multiple vsnprintf() definitions.
4+
5+ * include/stdio.h [C++] (__mingw_stdio_redirect__): Defer redirection
6+ to in-line definitions applicable for C, when the compiler suite is...
7+ [__GNUC__]: ...this.
8+
19 2019-10-16 Keith Marshall <keith@users.osdn.me>
210
311 Address MinGW-Issue #39677; declare _findclose() only once.
--- a/mingwrt/include/stdio.h
+++ b/mingwrt/include/stdio.h
@@ -379,26 +379,26 @@ extern unsigned int _mingw_output_format_control( unsigned int, unsigned int );
379379 /* User has expressed a preference for C99 conformance...
380380 */
381381 # undef __mingw_stdio_redirect__
382-# ifdef __cplusplus
383-/* For C++ we use inline implementations, to avoid interference
384- * with namespace qualification, which may result from using #defines.
385- */
386-# define __mingw_stdio_redirect__ inline __cdecl __MINGW_NOTHROW
387-
388-# elif defined __GNUC__
382+# if defined __GNUC__
389383 /* FIXME: Is there any GCC version prerequisite here?
390384 *
391- * We also prefer inline implementations for C, when we can be confident
392- * that the GNU specific __inline__ mechanism is supported.
385+ * We prefer inline implementations for both C and C++, when we can be
386+ * confident that the GNU specific __inline__ mechanism is supported.
393387 */
394388 # define __mingw_stdio_redirect__ static __inline__ __cdecl __MINGW_NOTHROW
395389
396-# else /* Neither C++ nor __GNUC__ */
390+# elif defined __cplusplus
391+/* For non-GNU C++ we use inline implementations, to avoid interference
392+ * with namespace qualification, which may result from using #defines.
393+ */
394+# define __mingw_stdio_redirect__ inline __cdecl __MINGW_NOTHROW
395+
396+# else /* Neither GCC, nor non-GNU C++ */
397397 /* Can't use inlines; fall back on module local static stubs.
398398 */
399399 # define __mingw_stdio_redirect__ static __cdecl __MINGW_NOTHROW
400400
401-# endif /* Neither C++ nor __GNUC__ */
401+# endif /* Neither GCC, nor non-GNU C++ */
402402 #endif /* __USE_MINGW_ANSI_STDIO || defined _ISOC99_SOURCE */
403403
404404 #if __USE_MINGW_ANSI_STDIO
Show on old repository browser