This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Re: eh_globals.cc compilation errors with -threads under hpux 10.20


In article <200105222049.f4MKnWv49139@latour.rsch.comm.mot.com>,
Loren James Rittle <rittle> writes:

> BTW, great timing as I just looked closely at these threading issues
> in some detail recently (I have an unsubmitted patch that is for an
> unrelated threading issue).

BTW, my unsubmitted patch (unsubmitted since it isn't tested or done
yet) is to fix this strange situation:

From ./config/threads-posix.h:

[...]
#include <bits/c++config.h>
[...]
#include <pthread.h>
[...]
// Currently needed for stl/bits/stl_config.h
# define _PTHREADS
[...]

From ./include/bits/c++config.h:

[...]
// From SGI's stl_config.h; generic settings and user hooks (_NOTHREADS).
#ifdef _REENTRANT
# define __STL_THREADS
#endif

#if defined(_PTHREADS) && !defined(_NOTHREADS)
# define __STL_PTHREADS
#endif
[...]

Notice that _PTHREADS is defined in ./config/threads-posix.h after it
included ./include/bits/c++config.h (which checked for that macro being
defined)...

I think this may of happened back in February when stl_config.h was
removed, but I haven't completely figured it out yet.

I have 100% convinced myself that it is either broken; or the comment
on the define of _PTHREADS and that define is now wrong; or it broken
for only some ports since I can prove to myself with 'g++ -E -dM' that
the correct symbols are no longer being defined when libstdc++ was
configured for thread use...

Regards,
Loren


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]