Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-10-05 10:48:36

On Tue, Oct 05, 2004 at 04:28:46PM +0100, John Maddock wrote:

> >Markus, I believe what you're seeing is the problem that prompted the
> >GCC developers to unconditionally define _REENTRANT even when -pthread
> >is not given (and which breaks Boost for GCC 3.4), see
> >
> That's what I thought, but suggests that
> _REENTRANT *is* defined, even without -pthread (unless this is an artifact
> of including <iostream>).

<iostream> includes <ostream> which includes <ios> which includes <iosfwd>
which includes $platform/bits/c++io.h which includes gthr.h which includes
gthr-default.h which defines _REENTRANT to 1.

Solution: define _REENTRANT before including anything, or include a
libstdc++ header (which will define _REENTRANT and include pthread.h)


A man needs a mistress, just to break the monogamy.

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