From dcd606e1e1bf7a065d0ad25ec5bb2f9c22fb5c7b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 31 Jan 2005 17:06:43 +0000 Subject: [PATCH] Turn off threading support if glibc++ is single threaded. Enable threading support on HPUX for gcc >= 3.3. [SVN r26967] --- include/boost/config/platform/hpux.hpp | 12 +++++++++--- include/boost/config/stdlib/libstdcpp3.hpp | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/boost/config/platform/hpux.hpp b/include/boost/config/platform/hpux.hpp index 21049059..fa773aa7 100644 --- a/include/boost/config/platform/hpux.hpp +++ b/include/boost/config/platform/hpux.hpp @@ -21,9 +21,15 @@ #define BOOST_NO_SWPRINTF #define BOOST_NO_CWCTYPE -#ifdef __GNUC__ - // GNU C on HP-UX does not support threads (checked up to gcc 3.3) -# define BOOST_DISABLE_THREADS +#if defined(__GNUC__) +# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)) + // GNU C on HP-UX does not support threads (checked up to gcc 3.3) +# define BOOST_DISABLE_THREADS +# elif !defined(BOOST_DISABLE_THREADS) + // threads supported from gcc-3.3 onwards: +# define BOOST_HAS_THREADS +# define BOOST_HAS_PTHREADS +# endif #endif // boilerplate code: diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index 9774e876..8669dbd0 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -39,6 +39,9 @@ # else # define BOOST_DISABLE_THREADS # endif +#elif defined(__GLIBCPP__) && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) + // disable thread support if the std lib was built single threaded: +# define BOOST_DISABLE_THREADS #endif