File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,9 @@ struct rvalue_from_python_storage
8989template <class T >
9090struct rvalue_from_python_data : rvalue_from_python_storage<T>
9191{
92- # if (!defined(__MWERKS__) || __MWERKS__ >= 0x3000) && (!defined(__EDG_VERSION__) || __EDG_VERSION__ >= 245)
92+ # if (!defined(__MWERKS__) || __MWERKS__ >= 0x3000) \
93+ && (!defined (__EDG_VERSION__) || __EDG_VERSION__ >= 245 ) \
94+ && (!defined (__DECCXX_VER) || __DECCXX_VER > 60590014 )
9395 // This must always be a POD struct with m_data its first member.
9496 BOOST_STATIC_ASSERT (offsetof(rvalue_from_python_storage<T>,stage1) == 0);
9597# endif
Original file line number Diff line number Diff line change 2020// 04 Mar 01 Rolled in some changes from the Dragon fork (Dave Abrahams)
2121// 01 Mar 01 define PyObject_INIT() for Python 1.x (Dave Abrahams)
2222
23+ // Python's LongObject.h helpfully #defines these for us, which confuses Boost's config
24+ #include < limits.h>
25+ #ifndef ULONG_MAX
26+ # define BOOST_PYTHON_ULONG_MAX_UNDEFINED
27+ #endif
28+ #ifndef LONGLONG_MAX
29+ # define BOOST_PYTHON_LONGLONG_MAX_UNDEFINED
30+ #endif
31+ #ifndef ULONGLONG_MAX
32+ # define BOOST_PYTHON_ULONGLONG_MAX_UNDEFINED
33+ #endif
2334
2435#include < patchlevel.h>
2536
@@ -104,6 +115,21 @@ typedef int pid_t;
104115
105116#include < Python.h>
106117
118+ #ifdef BOOST_PYTHON_ULONG_MAX_UNDEFINED
119+ # undef ULONG_MAX
120+ # undef BOOST_PYTHON_ULONG_MAX_UNDEFINED
121+ #endif
122+
123+ #ifdef BOOST_PYTHON_LONGLONG_MAX_UNDEFINED
124+ # undef LONGLONG_MAX
125+ # undef BOOST_PYTHON_LONGLONG_MAX_UNDEFINED
126+ #endif
127+
128+ #ifdef BOOST_PYTHON_ULONGLONG_MAX_UNDEFINED
129+ # undef ULONGLONG_MAX
130+ # undef BOOST_PYTHON_ULONGLONG_MAX_UNDEFINED
131+ #endif
132+
107133#ifdef PY_MSC_VER_DEFINED_FROM_WRAP_PYTHON_H
108134# undef _MSC_VER
109135#endif
You can’t perform that action at this time.
0 commit comments