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@
This commit is contained in:
kurt 2008-06-05 12:55:56 +00:00
parent d32a88a3c4
commit e0ef9069a3
2 changed files with 20 additions and 2 deletions

View File

@ -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}

View File

@ -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 <boost/detail/atomic_count_pthreads.hpp>
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
# include <boost/detail/atomic_count_win32.hpp>
-#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
+#elif defined(__GLIBCXX__) && \
+ (defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || \
+ defined(_GLIBCXX__PTHREADS))
+# include <boost/detail/atomic_count_gcc.hpp>
+#elif defined(__GLIBCPP__) && \
+ (defined(_GLIBCPP_HAVE_GTHR_DEFAULT) || \
+ defined(_GLIBCPP__PTHREADS))
# include <boost/detail/atomic_count_gcc.hpp>
#elif defined(BOOST_HAS_PTHREADS)
# define BOOST_AC_USE_PTHREADS