Boost logo

Boost :

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


On Wed, Oct 06, 2004 at 02:51:49PM +0200, Markus Sch?pflin wrote:

> John Maddock wrote:
>
> >>Attached is the output of "gcc -ansi -dM". I hope it contains enough
> >>information to answer your questions. Note also that _REENTRANT is not
> >>defined here, therefore its source must be somewhere outside of gcc.
>
> John, I attached a diffent patch for the file to this mail which fixes the
> problem. First of all, the platform in question is Tru64 (not HP-UX).
>
> Next, when the file is included by the compiler, _GLIBCPP_HAVE_GTHR_DEFAULT
                                                         ^^
This should be _GLIBCXX_... not _GLIBCPP_...

Without that check you will define _REENTRANT even when GCC was
configured with --disable-threads (or its equivalents such as
--enable-threads=single), which would be even worse than the current
state. At least the current config headers can tell whether GCC 3.4
_supports_ threads, it just can't tell whether it's _using_ threads.

Since this issue only affects GCC 3.4 (previous versions did NOT define
_REENTRANT unconditionally - which was a problem for OSF) if the check
is for CXX not CPP then it automatically excludes previous (working)
versions, as desired.

> is _not_ defined. Therefore I changed the check to __osf__ && !_REENTRANT
> to just unconditionally define _REENTRANT on Tru64.

I still don't know why it isn't defined by the libstdc++ headers in that
particular case, but is in the config_test.

I wish they'd just fix this in GCC :-(

jon

-- 
"Programming is one of the most difficult branches of applied mathematics;
 the poorer mathematicians had better remain pure mathematicians."
	- Edsger Dijkstra

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