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,

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...

Eddy

[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