|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-09-24 14:52:16
From: "William Kempf" <williamkempf_at_[hidden]>
> It's correct as written. The macro BOOST_DISABLE_THREADS is used to
disable
> Boost thread support even if the config stuff detects that thread support
is
> enabled for the compiler/platform.
(cc: to the list)
Look at the context:
//
// Turn on threading support if the compiler thinks that it's in
// multithreaded mode. We put this here because there are only a
// limited number of macros that identify this (if there's any missing
// from here then add to the appropriate compiler section):
//
#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
|| defined(_PTHREADS)) && !defined(BOOST_DISABLE_THREADS)
# define BOOST_HAS_THREADS
#endif
//
// Turn threading support off if BOOST_DISABLE_THREADS is defined:
//
#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
# undef BOOST_HAS_THREADS
#endif
-- BOOST_DISABLE_THREADS is handled separately by the second block; if BOOST_HAS_THREADS is already defined (the first comment implies that this is possible) the first #define causes a redefinition. At least this is my understanding of it. ----- Original Message ----- From: "William Kempf" <williamkempf_at_[hidden]> To: <bdawes_at_[hidden]>; <pdimov_at_[hidden]> Sent: Monday, September 24, 2001 20:51 Subject: Re: [boost] On boost.config > It's correct as written. The macro BOOST_DISABLE_THREADS is used to disable > Boost thread support even if the config stuff detects that thread support is > enabled for the compiler/platform. > > Bill Kempf > williamkempf_at_[hidden] > > > > >From: Beman Dawes <bdawes_at_[hidden]> > >To: "Peter Dimov" <pdimov_at_[hidden]> > >CC: William Kempf <williamkempf_at_[hidden]> > >Subject: Re: [boost] On boost.config > >Date: Mon, 24 Sep 2001 11:37:54 -0400 > > > >Peter, > > > > >* Shouldn't !defined(BOOST_DISABLE_THREADS) below > > > > > >#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ > > > || defined(_PTHREADS)) && !defined(BOOST_DISABLE_THREADS) > > ># define BOOST_HAS_THREADS > > >#endif > > > > > >be !defined(BOOST_HAS_THREADS)? > > > > > >I can (try to) fix the above if there are no objections. > > > >I'm not sure about the last one. I think it may be correct as written. > > > >You might want to get the OK from John Maddock or Bill Kempf before you > >make the change. > > > >--Beman > > > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > >
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk