blob: 3013169206f0316eb7a42cae61f9430b851f2c58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- boost/python/detail/config.hpp.orig Tue Nov 29 23:27:18 2005
+++ boost/python/detail/config.hpp Sun Dec 17 13:24:16 2006
@@ -111,7 +111,15 @@
# define BOOST_PYTHON_OFFSETOF(s_name, s_member) \
((size_t)__INTADDR__(&(((s_name *)0)->s_member)))
#else
-# define BOOST_PYTHON_OFFSETOF offsetof
+// workaround from http://www.freebsd.org/cgi/query-pr.cgi?pr=72307
+#if __GNUC__ <= 3
+#define BOOST_PYTHON_OFFSETOF(TYPE, MEMBER)\
+ (__offsetof__ (reinterpret_cast <size_t>\
+ (&reinterpret_cast <const volatile char &>\
+ (static_cast<TYPE *> (0)->MEMBER))))
+#else
+#define BOOST_PYTHON_OFFSETOF offsetof
+#endif
#endif
#endif // CONFIG_DWA052200_H_
|