From: Lasse Collin Date: Sat, 23 Oct 2010 09:26:33 +0000 (+0300) Subject: Windows: Use MinGW's stdio functions. X-Git-Tag: upstream/5.1.3~215 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e61d85e082743ebd2dd0ff28fc0a82482ede0538;p=platform%2Fupstream%2Fxz.git 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. --- diff --git a/src/common/sysdefs.h b/src/common/sysdefs.h index 1e138b1..c74c621 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