From e0ef9069a3b4b71cf1e30388e9671d1fd35f3551 Mon Sep 17 00:00:00 2001 From: kurt Date: Thu, 5 Jun 2008 12:55:56 +0000 Subject: [PATCH] fix atomic_count.hpp: libstdc++ is not built with thread support yet so adjust atomic_count.hpp to only use libstdc++ when it has been built with thread support and fall back to using the pthreads implementation. diagnosed, tested and okay deanna@ --- devel/boost/Makefile | 4 ++-- .../patch-boost_detail_atomic_count_hpp | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 devel/boost/patches/patch-boost_detail_atomic_count_hpp diff --git a/devel/boost/Makefile b/devel/boost/Makefile index b319d618700..f8600b9c598 100644 --- a/devel/boost/Makefile +++ b/devel/boost/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.15 2008/05/27 00:52:01 deanna Exp $ +# $OpenBSD: Makefile,v 1.16 2008/06/05 12:55:56 kurt Exp $ COMMENT= free peer-reviewed portable C++ source libraries -PKGNAME= boost-${VERSION}p1 +PKGNAME= boost-${VERSION}p2 VERSION= 1.34.1 DISTNAME= boost_${VERSION:S/./_/g} diff --git a/devel/boost/patches/patch-boost_detail_atomic_count_hpp b/devel/boost/patches/patch-boost_detail_atomic_count_hpp new file mode 100644 index 00000000000..325d79ca748 --- /dev/null +++ b/devel/boost/patches/patch-boost_detail_atomic_count_hpp @@ -0,0 +1,18 @@ +$OpenBSD: patch-boost_detail_atomic_count_hpp,v 1.1 2008/06/05 12:55:56 kurt Exp $ +--- boost/detail/atomic_count.hpp.orig Wed Mar 30 17:52:54 2005 ++++ boost/detail/atomic_count.hpp Thu Jun 5 07:17:02 2008 +@@ -93,7 +93,13 @@ typedef long atomic_count; + # include + #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) + # include +-#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) ++#elif defined(__GLIBCXX__) && \ ++ (defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || \ ++ defined(_GLIBCXX__PTHREADS)) ++# include ++#elif defined(__GLIBCPP__) && \ ++ (defined(_GLIBCPP_HAVE_GTHR_DEFAULT) || \ ++ defined(_GLIBCPP__PTHREADS)) + # include + #elif defined(BOOST_HAS_PTHREADS) + # define BOOST_AC_USE_PTHREADS