Index: generic/nsfInt.h =================================================================== diff -u -r880487204ff2da18d2d25ebd727b9b4bbda86c8e -r836e08bf2af69a30dcd2cf6bb2e19f97d798b98a --- generic/nsfInt.h (.../nsfInt.h) (revision 880487204ff2da18d2d25ebd727b9b4bbda86c8e) +++ generic/nsfInt.h (.../nsfInt.h) (revision 836e08bf2af69a30dcd2cf6bb2e19f97d798b98a) @@ -35,6 +35,21 @@ # define HAVE_UINTPTR_T #endif +/* + * MinGW and MinGW-w64 provide both MSCRT-compliant and ANSI-compliant + * implementations of certain I/O operations (e.g., *printf()). By + * setting __USE_MINGW_ANSI_STDIO to 1 explicitly, we can assume the + * ANSI versions. + * + * Note: It is sufficient to test for __MINGW32__ to trap all MinGW + * tool chains, including 64bit versions. See + * http://sourceforge.net/p/predef/wiki/Compilers/#mingw-and-mingw-w64 + */ + +#if defined(__MINGW32__) && !defined(__USE_MINGW_ANSI_STDIO) +#define __USE_MINGW_ANSI_STDIO 1 +#endif + #include #include "nsf.h" @@ -1057,7 +1072,6 @@ #endif #endif - #if !defined(NDEBUG) /*# define NSF_INLINE*/ #endif