On Feb 20, 2011, at 17:50, Bruno Haible wrote:
> For the PTHREAD_CFLAGS it is more tricky: On most platforms you can use
> "-lpthread" instead of "-pthread", and all compilers support -l options.
> But on OSF/1, the options for using threads are compiler dependent:
>  * -pthread for cc,
>  * -lpthread for gcc.

There are other platforms where compiling for thread support changes more than 
just adding a library.  For example, in NetBSD 5.0, it looks like stdio.h 
defines getc() in a non-thread-safe way if _REENTRANT and _PTHREADS (which get 
defined by "gcc -pthread") are not defined.  So even with gcc, just replacing 
"-pthread" with "-lpthread" isn't good enough.

Ken

Reply via email to