Re: GCC 4.1.2 / glibc Pthreads requires macro defined to get 'standard' functionality

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, thanks for your reply.

What is your platform?

It is also (apparently) an issue on either Ubunto or Gentoo (sorry,
can't remember which, so please feel free to correct me...), so I know
it is not unique to openSuSE, which would imply something more
fundamental...

Eddy

John Love-Jensen wrote:
> Hi Eddy,
> 
>> Why can't I:
>>
>> #include <stdlib.h>
>> #include <stdio.h>
>> #include <pthread.h>
>>
>> int main ()
>> {
>> printf("Value of PTHREAD_MUTEX_RECURSIVE is: %d\n",
>> PTHREAD_MUTEX_RECURSIVE);
>> return 0;
>> }
>>
>> I have to define _XOPEN_SOURCE 500 or _GNU_SOURCE to get it to work
>>
>> OS is SuSE 10.2 with provided version of GCC.
>>
>> Man page for pthread.h does not describe this requirement in any way and
>> it seems just plain weird that the cross-platform / standard behaviour
>> is NOT available without some voodoo...
> 
> Good question!
> 
> You should ask this question on a SuSe forum and/or on a Pthread forum.
> Probably the former, moreso than the latter.
> 
> My platform does not have that requirement that you encountered.  On my
> system, the value of PTHREAD_MUTEX_RECURSIVE is 2.
> 
> Sincerely,
> --Eljay
> 
> 

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux