diff --git a/include/boost/python/detail/prefix.hpp b/include/boost/python/detail/prefix.hpp index 2ce40e16..f65ccbad 100755 --- a/include/boost/python/detail/prefix.hpp +++ b/include/boost/python/detail/prefix.hpp @@ -9,8 +9,11 @@ // headers (so it can get control over some awful macros). // Unfortunately, Boost.Python needs to #include first, at // least... but this gets us as close as possible. + +# include # if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION == 741 -# include +# undef _POSIX_C_SOURCE +# undef _XOPEN_SOURCE # endif # include # include diff --git a/include/boost/python/detail/wrap_python.hpp b/include/boost/python/detail/wrap_python.hpp index f2437d01..795e8b8b 100644 --- a/include/boost/python/detail/wrap_python.hpp +++ b/include/boost/python/detail/wrap_python.hpp @@ -40,6 +40,10 @@ // #include +#if PY_MAJOR_VERSION<2 || PY_MAJOR_VERSION==2 && PY_MINOR_VERSION<2 +#error Python 2.2 or higher is required for this version of Boost.Python. +#endif + #ifdef _DEBUG # ifndef BOOST_DEBUG_PYTHON # undef _DEBUG // Don't let Python force the debug library just because we're debugging. @@ -96,19 +100,9 @@ typedef int pid_t; # define _MSC_VER 900 # endif -# if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 2 -# include -# else -# include -# endif # undef hypot // undo the evil #define left by Python. # elif defined(__BORLANDC__) -# if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 2 -# include -# else -# include -# endif # undef HAVE_HYPOT # define HAVE_HYPOT 1 # endif