Re: -lpthread vs -pthread: does -D_REENTRANT matter?

2012-11-08 Thread Eitan Adler
On 8 October 2012 12:17, Eitan Adler li...@eitanadler.com wrote: The only difference between -lpthread and -pthread that I could see is that the latter also sets -D_REENTRANT. However, I can't find any uses of _REENTRANT anywhere outside of a few utilities that seem to define it manually.

Re: -lpthread vs -pthread: does -D_REENTRANT matter?

2012-10-21 Thread Jilles Tjoelker
On Sun, Oct 14, 2012 at 04:55:07PM -0400, Eitan Adler wrote: On 14 October 2012 10:42, Jilles Tjoelker jil...@stack.nl wrote: Because C99 does not specify threading, it allows these transformations. In C11, they are forbidden. Passing -pthread disables them as well. Is the man page wrong

Re: -lpthread vs -pthread: does -D_REENTRANT matter?

2012-10-14 Thread Jilles Tjoelker
On Mon, Oct 08, 2012 at 12:17:08PM -0400, Eitan Adler wrote: The only difference between -lpthread and -pthread that I could see is that the latter also sets -D_REENTRANT. However, I can't find any uses of _REENTRANT anywhere outside of a few utilities that seem to define it manually.

Re: -lpthread vs -pthread: does -D_REENTRANT matter?

2012-10-14 Thread Raphael Kubo da Costa
Jilles Tjoelker jil...@stack.nl writes: On Mon, Oct 08, 2012 at 12:17:08PM -0400, Eitan Adler wrote: The only difference between -lpthread and -pthread that I could see is that the latter also sets -D_REENTRANT. However, I can't find any uses of _REENTRANT anywhere outside of a few utilities

Re: -lpthread vs -pthread: does -D_REENTRANT matter?

2012-10-14 Thread Eitan Adler
On 14 October 2012 10:42, Jilles Tjoelker jil...@stack.nl wrote: Because C99 does not specify threading, it allows these transformations. In C11, they are forbidden. Passing -pthread disables them as well. Is the man page wrong or do I misunderstand? This option sets flags for both

-lpthread vs -pthread: does -D_REENTRANT matter?

2012-10-08 Thread Eitan Adler
The only difference between -lpthread and -pthread that I could see is that the latter also sets -D_REENTRANT. However, I can't find any uses of _REENTRANT anywhere outside of a few utilities that seem to define it manually. Testing with various manually written pthread programs resulted in