Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-04-10 18:24:28


Another observation: the difference between g++/Sun in ST and MT mode:

http://www.boost.org/development/tests/trunk/developer/output/Sandia-sun-boost-bin-v2-status-config_info-test-gcc-3-4-6-debug.html

http://www.boost.org/development/tests/trunk/developer/output/Sandia-sun-boost-bin-v2-status-config_info_threaded-test-gcc-3-4-6-debug-threading-multi.html

is in the _PTHREADS macro (_REENTRANT is defined in both cases, which causes
BOOST_HAS_THREADS and BOOST_HAS_PTHREADS to be defined as well even in ST
mode.)

Taking a Linux g++ at random:

http://www.boost.org/development/tests/trunk/developer/output/Sandia-gcc-boost-bin-v2-status-config_info-test-gcc-4-2-1-debug.html

http://www.boost.org/development/tests/trunk/developer/output/Sandia-gcc-boost-bin-v2-status-config_info_threaded-test-gcc-4-2-1-debug-threading-multi.html

_REENTRANT is correctly only defined in MT mode, but BOOST_HAS_THREADS (and
BOOST_HAS_PTHREADS) incorrectly remains defined in both.

g++ 4.1 also seems to work the same way, whereas g++ 4.0 and g++ 3.4 do not,
they always define _REENTRANT and there doesn't seem to be a way to detect
MT mode (at least judging by the output of config_info).


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