Enables GNU printf functions in MINGW.

This commit is contained in:
Andrea Mazzoleni 2015-01-02 21:38:16 +01:00
parent 0af5358d69
commit 08c7a23774
2 changed files with 3 additions and 0 deletions

View file

@ -1755,6 +1755,8 @@ int randomize(void* ptr, size_t size)
* In Windows printf() is not atomic, and multiple threads
* will have output interleaved.
*
* Note that even defining __USE_MINGW_ANSI_STDIO the problem persists.
*
* See for example:
*
* Weird output when I use pthread and printf.

View file

@ -26,6 +26,7 @@
/* Config */
#ifdef __MINGW32__ /* Specific for MINGW */
#define __USE_MINGW_ANSI_STDIO 1 /* Enable the GNU printf functions instead of using the MSVCRT ones */
#define __MSVCRT_VERSION__ 0x0601 /* Define the MSVCRT version targetting Windows XP */
#define _WIN32_WINNT 0x501 /* Include Windows XP CreateHardLinkW */
#include <windows.h>