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.
Revision | 3c7767ef789712844a47d4e5360a65f542753694 (tree) |
---|---|
Time | 2019-10-26 18:33:12 |
Author | Keith Marshall <keith@user...> |
Commiter | Keith Marshall |
Fix MinGW-Issue #39757; avoid multiple vsnprintf() definitions.
@@ -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 | + | |
1 | 9 | 2019-10-16 Keith Marshall <keith@users.osdn.me> |
2 | 10 | |
3 | 11 | Address MinGW-Issue #39677; declare _findclose() only once. |
@@ -379,26 +379,26 @@ extern unsigned int _mingw_output_format_control( unsigned int, unsigned int ); | ||
379 | 379 | /* User has expressed a preference for C99 conformance... |
380 | 380 | */ |
381 | 381 | # 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__ | |
389 | 383 | /* FIXME: Is there any GCC version prerequisite here? |
390 | 384 | * |
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. | |
393 | 387 | */ |
394 | 388 | # define __mingw_stdio_redirect__ static __inline__ __cdecl __MINGW_NOTHROW |
395 | 389 | |
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++ */ | |
397 | 397 | /* Can't use inlines; fall back on module local static stubs. |
398 | 398 | */ |
399 | 399 | # define __mingw_stdio_redirect__ static __cdecl __MINGW_NOTHROW |
400 | 400 | |
401 | -# endif /* Neither C++ nor __GNUC__ */ | |
401 | +# endif /* Neither GCC, nor non-GNU C++ */ | |
402 | 402 | #endif /* __USE_MINGW_ANSI_STDIO || defined _ISOC99_SOURCE */ |
403 | 403 | |
404 | 404 | #if __USE_MINGW_ANSI_STDIO |