Boost logo

Boost :

From: John Maddock (boost.regex_at_[hidden])
Date: 2003-08-24 06:05:35


> From the g++ man pages, -mthreads "Support thread-safe exception handling
> on Mingw32" and only defines _MT for Mingw32. Therefore, after threading
> support is disabled on line 53 of boost/config/compiler/gcc.hpp, nothing
> actually enables it again for a non-Mingw32 cygwin build. Is this the
> desired behaviour? (If I removed the check for __CYGWIN__ in gcc.hpp,
> everything compiles and the tests seem to run correctly).

No it's not desired - boost/config/suffix.hpp checks for _MT and turns
threading support on when it finds it, however, when I build the following
program with the -mthreads option I see the #error triggered:

#ifndef _MT
#error oops
#endif

Looking further into the specs file it seems that _MT is only defined if you
use both -mno-cygwin and -mthreads, cygwin itself appears to no longer set
any define in multi-threading mode, so I guess we're back to setting
BOOST_HAS_THREADS unconditionally for that compiler :-(

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk