diff --git a/include/boost/python/detail/wrap_python.hpp b/include/boost/python/detail/wrap_python.hpp index 4921578f..cce01868 100644 --- a/include/boost/python/detail/wrap_python.hpp +++ b/include/boost/python/detail/wrap_python.hpp @@ -22,6 +22,26 @@ #ifdef _DEBUG # ifndef BOOST_DEBUG_PYTHON +# ifdef _MSC_VER + // VC8.0 will complain if system headers are #included both with + // and without _DEBUG defined, so we have to #include all the + // system headers used by pyconfig.h right here. +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# endif # undef _DEBUG // Don't let Python force the debug library just because we're debugging. # define DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H # endif @@ -97,7 +117,7 @@ typedef int pid_t; # define HAVE_LONG_LONG 1 # define LONG_LONG long long -# endif +# endif # elif defined(__MWERKS__) @@ -143,6 +163,10 @@ typedef int pid_t; #ifdef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H # undef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H # define _DEBUG +# ifdef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H +# undef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H +# undef _CRT_NOFORCE_MANIFEST +# endif #endif #if !defined(PY_MAJOR_VERSION) || PY_MAJOR_VERSION < 2