Skip to content

Commit 559b564

Browse files
committed
tru64cxx6.5 fixes
[SVN r14421]
1 parent 3ac4cfb commit 559b564

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

include/boost/python/converter/rvalue_from_python_data.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ struct rvalue_from_python_storage
8989
template <class T>
9090
struct 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

include/boost/python/detail/wrap_python.hpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@
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

0 commit comments

Comments
 (0)