From e61d85e082743ebd2dd0ff28fc0a82482ede0538 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 23 Oct 2010 12:26:33 +0300 Subject: Windows: Use MinGW's stdio functions. The non-standard ones from msvcrt.dll appear to work most of the time with XZ Utils, but there are some corner cases where things may go very wrong. So it's good to use the better replacements provided by MinGW(-w64) runtime. --- src/common/sysdefs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/sysdefs.h b/src/common/sysdefs.h index 1e138b1c..c74c6212 100644 --- a/src/common/sysdefs.h +++ b/src/common/sysdefs.h @@ -24,6 +24,11 @@ # include #endif +// Get standard-compliant stdio functions under MinGW and MinGW-w64. +#ifdef __MINGW32__ +# define __USE_MINGW_ANSI_STDIO 1 +#endif + // size_t and NULL #include -- cgit v1.2.3