diff -r f24cd8bc5250 Include/pyport.h --- a/Include/pyport.h Thu Jun 04 21:58:16 2015 +1000 +++ b/Include/pyport.h Thu Jun 04 22:18:05 2015 +0700 @@ -877,12 +877,11 @@ #define PY_LITTLE_ENDIAN 1 #endif -#ifdef Py_BUILD_CORE +#if defined Py_BUILD_CORE && defined _MSC_VER && _MSC_VER >= 1900 /* * Macros to protect CRT calls against instant termination when passed an * invalid parameter (issue23524). */ -#if defined _MSC_VER && _MSC_VER >= 1900 extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler; #define _Py_BEGIN_SUPPRESS_IPH { _invalid_parameter_handler _Py_old_handler = \ @@ -894,7 +893,6 @@ #define _Py_BEGIN_SUPPRESS_IPH #define _Py_END_SUPPRESS_IPH -#endif /* _MSC_VER >= 1900 */ -#endif /* Py_BUILD_CORE */ +#endif /* _MSC_VER >= 1900 && Py_BUILD_CORE */ #endif /* Py_PYPORT_H */