ports/devel/boost/files/FBSD5-patch-boost::python::detail::config.hpp
Sergey Matveychuk 19acb22d90 - Update devel/boost to 1.32.0
- Add slave devel/boost-python port
- Remove devel/spirit because of it's a part boost now

PR:		ports/75377
Submitted by:	Simon Barner <barner(at)gmx.de> (maintainer)
2004-12-24 12:23:12 +00:00

15 lines
624 B
C++

--- boost/python/detail/config.hpp.orig Tue Dec 14 14:17:42 2004
+++ boost/python/detail/config.hpp Tue Dec 14 14:19:36 2004
@@ -110,7 +110,11 @@
# 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
+#define BOOST_PYTHON_OFFSETOF(TYPE, MEMBER)\
+ (__offsetof__ (reinterpret_cast <size_t>\
+ (&reinterpret_cast <const volatile char &>\
+ (static_cast<TYPE *> (0)->MEMBER))))
#endif
#endif // CONFIG_DWA052200_H_