David Chisnall wrote:
> I'm not sure why this explicit cast should be required.  The type of
> both of these should be pthread_mutex_t.

foo.c:
==================================================
#include <pthread.h>

int
main (void)
{
  pthread_mutex_t foo;
  foo = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
}
==================================================

$ gcc foo.c
foo.c: In function ‘main’:
foo.c:7: error: ‘PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP’ undeclared (first use 
in this function)
foo.c:7: error: (Each undeclared identifier is reported only once
foo.c:7: error: for each function it appears in.)
$ gcc -D_GNU_SOURCE foo.c 
foo.c: In function ‘main’:
foo.c:7: error: expected expression before ‘{’ token

_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to