From 559b5647149c6af3f47bc69315b9dcb7ef4e9f40 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 12 Jul 2002 14:32:20 +0000 Subject: [PATCH] tru64cxx6.5 fixes [SVN r14421] --- .../converter/rvalue_from_python_data.hpp | 4 ++- include/boost/python/detail/wrap_python.hpp | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/include/boost/python/converter/rvalue_from_python_data.hpp b/include/boost/python/converter/rvalue_from_python_data.hpp index 9736c2c3..f30ceadb 100644 --- a/include/boost/python/converter/rvalue_from_python_data.hpp +++ b/include/boost/python/converter/rvalue_from_python_data.hpp @@ -89,7 +89,9 @@ struct rvalue_from_python_storage template struct rvalue_from_python_data : rvalue_from_python_storage { -# if (!defined(__MWERKS__) || __MWERKS__ >= 0x3000) && (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 245) +# if (!defined(__MWERKS__) || __MWERKS__ >= 0x3000) \ + && (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 245) \ + && (!defined(__DECCXX_VER) || __DECCXX_VER > 60590014) // This must always be a POD struct with m_data its first member. BOOST_STATIC_ASSERT(offsetof(rvalue_from_python_storage,stage1) == 0); # endif diff --git a/include/boost/python/detail/wrap_python.hpp b/include/boost/python/detail/wrap_python.hpp index 9c9bc2e4..7bafb9fe 100644 --- a/include/boost/python/detail/wrap_python.hpp +++ b/include/boost/python/detail/wrap_python.hpp @@ -20,6 +20,17 @@ // 04 Mar 01 Rolled in some changes from the Dragon fork (Dave Abrahams) // 01 Mar 01 define PyObject_INIT() for Python 1.x (Dave Abrahams) +// Python's LongObject.h helpfully #defines these for us, which confuses Boost's config +#include +#ifndef ULONG_MAX +# define BOOST_PYTHON_ULONG_MAX_UNDEFINED +#endif +#ifndef LONGLONG_MAX +# define BOOST_PYTHON_LONGLONG_MAX_UNDEFINED +#endif +#ifndef ULONGLONG_MAX +# define BOOST_PYTHON_ULONGLONG_MAX_UNDEFINED +#endif #include @@ -104,6 +115,21 @@ typedef int pid_t; #include +#ifdef BOOST_PYTHON_ULONG_MAX_UNDEFINED +# undef ULONG_MAX +# undef BOOST_PYTHON_ULONG_MAX_UNDEFINED +#endif + +#ifdef BOOST_PYTHON_LONGLONG_MAX_UNDEFINED +# undef LONGLONG_MAX +# undef BOOST_PYTHON_LONGLONG_MAX_UNDEFINED +#endif + +#ifdef BOOST_PYTHON_ULONGLONG_MAX_UNDEFINED +# undef ULONGLONG_MAX +# undef BOOST_PYTHON_ULONGLONG_MAX_UNDEFINED +#endif + #ifdef PY_MSC_VER_DEFINED_FROM_WRAP_PYTHON_H # undef _MSC_VER #endif