From 2b4ec466d0c6db26b964a10e4e9f659ce1177c37 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 3 Sep 2005 11:04:21 +0000 Subject: [PATCH] Detect non-default threading support. [SVN r30790] --- include/boost/config/stdlib/libstdcpp3.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index f367fa0f..84a089fe 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -30,7 +30,8 @@ #endif #ifdef __GLIBCXX__ // gcc 3.4 and greater: -# ifdef _GLIBCXX_HAVE_GTHR_DEFAULT +# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ + || defined(_GLIBCXX__PTHREADS) // // If the std lib has thread support turned on, then turn it on in Boost // as well. We do this because some gcc-3.4 std lib headers define _REENTANT @@ -40,7 +41,9 @@ # else # define BOOST_DISABLE_THREADS # endif -#elif defined(__GLIBCPP__) && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) +#elif defined(__GLIBCPP__) \ + && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \ + && !defined(_GLIBCPP__PTHREADS) // disable thread support if the std lib was built single threaded: # define BOOST_DISABLE_THREADS #endif