diff options
author | barner <barner@FreeBSD.org> | 2006-12-18 18:38:45 +0800 |
---|---|---|
committer | barner <barner@FreeBSD.org> | 2006-12-18 18:38:45 +0800 |
commit | aaad728ea925154105a0f250e4969c1d9ebc554e (patch) | |
tree | da2f2dca31f1664c0142a7da7714ab6fcc2c10bb | |
parent | fcb11a65d4eaab672abe66d9655715e7ac871a40 (diff) | |
download | freebsd-ports-gnome-aaad728ea925154105a0f250e4969c1d9ebc554e.tar.gz freebsd-ports-gnome-aaad728ea925154105a0f250e4969c1d9ebc554e.tar.zst freebsd-ports-gnome-aaad728ea925154105a0f250e4969c1d9ebc554e.zip |
- Fix build with g++41 by restricting the offsetof workaround for use
with g++3.x and below
Requested by: kris
-rw-r--r-- | devel/boost/files/FBSD5-patch-boost::python::detail::config.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/devel/boost/files/FBSD5-patch-boost::python::detail::config.hpp b/devel/boost/files/FBSD5-patch-boost::python::detail::config.hpp index f3ce05a4d7d5..3013169206f0 100644 --- a/devel/boost/files/FBSD5-patch-boost::python::detail::config.hpp +++ b/devel/boost/files/FBSD5-patch-boost::python::detail::config.hpp @@ -1,15 +1,19 @@ ---- 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 @@ +--- 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_ |