diff --git a/cmdline/mingw.c b/cmdline/mingw.c index f5b80b2b..a44e33a0 100644 --- a/cmdline/mingw.c +++ b/cmdline/mingw.c @@ -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. diff --git a/cmdline/portable.h b/cmdline/portable.h index b88ec705..729e9458 100644 --- a/cmdline/portable.h +++ b/cmdline/portable.h @@ -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