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


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

Pthread options (was: Re: Memory allocators / STL)


Benjamin Kosnik wrote:
> 
> [somebody else wrote:]
> >
> > - Quite a few discussions on lists have been about __USE_MALLOC and other
> > compiletime flags/options. What are the "default" for a MT program - is there
> > really a need for anything else that -pthread at compile and -lpthread at link
> > time?
> 
> There should not be anything required except using -pthread. You
> shouldn't have to use __USE_MALLOC at all.

What about -D_REENTRANT?

I was under the impression that the requirements for pthreads were
-D_REENTRANT (or the equivalent #define in the code) at compile time and
-lpthread at link time. I've never heard of this -pthread compile time
option, and neither has the GCC manual. Could you explain please?

-- 
Ross Smith ...................................... Auckland, New Zealand
r-smith@ihug.co.nz ........................ http;//halflife.mani.ac.nz/
        "A wise man learns from the mistakes of others; a fool
        learns only from his own."     -- Gen. Aleksandr Lebed


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