Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-10-06 07:11:57

On Wed, Oct 06, 2004 at 12:36:58PM +0100, John Maddock wrote:

> #ifdef __GLIBCXX__ // gcc 3.4 and greater:
> //
> // 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
> // while others do not...
> //
> # else
> # endif
> #endif

John, this comment (which is in the current version in CVS) is
misleading, and IMHO the whole thing is redundant.

If *any* 3.4 libstdc++ header is included and _GLIBCXX_HAVE_GTHR_DEFAULT
is defined then gthr-default.h will be included and therefore _REENTRANT
will be defined, and therefore BOOST_HAS_THREADS will be defined anyway
by boost/config/suffix.hpp
(this is the case for GCC configured for MT support.)

If _GLIBCXX_HAVE_GTHR_DEFAULT is not defined then gthr-default.h will
not be included, and _REENTRANT will not be defined, and
BOOST_DISABLE_THREADS will be defined by boost/config/suffix.hpp
(this is the case for GCC configured with no support for MT.)

I don't think that bit of preprocessor code changes anything (but I
might be wrong again)


"It is seldom that liberty of any kind is lost all at once."
	- David Hume

Boost list run by bdawes at, gregod at, cpdaniel at, john at