pthread_keycreate not pthread_key_create under the here be dragons API
Artur Bergman [Fri, 12 Oct 2001 18:11:45 +0000 (18:11 +0000)]
p4raw-id: //depot/perl@12411

ext/threads/threads.h

index 01baaa4..72a4872 100755 (executable)
@@ -23,18 +23,24 @@ STMT_START {\
 #include <thread.h>
 
 #define PERL_THREAD_SETSPECIFIC(k,v) pthread_setspecific(k,v)
+#ifdef OLD_PTHREADS_API
+#define PERL_THREAD_DETACH(t) pthread_detach(&(t))
+#define PERL_THREAD_GETSPECIFIC(k,v) pthread_getspecific(k,&v)
 #define PERL_THREAD_ALLOC_SPECIFIC(k) STMT_START {\
-  if(pthread_key_create(&(k),0)) {\
+  if(pthread_keycreate(&(k),0)) {\
     PerlIO_printf(PerlIO_stderr(), "panic threads.h: pthread_key_create");\
     exit(1);\
   }\
 } STMT_END
-#ifdef OLD_PTHREADS_API
-#define PERL_THREAD_DETACH(t) pthread_detach(&(t))
-#define PERL_THREAD_GETSPECIFIC(k,v) pthread_getspecific(k,&v)
 #else
 #define PERL_THREAD_DETACH(t) pthread_detach((t))
 #define PERL_THREAD_GETSPECIFIC(k,v) v = pthread_getspecific(k)
+#define PERL_THREAD_ALLOC_SPECIFIC(k) STMT_START {\
+  if(pthread_key_create(&(k),0)) {\
+    PerlIO_printf(PerlIO_stderr(), "panic threads.h: pthread_key_create");\
+    exit(1);\
+  }\
+} STMT_END
 #endif
 #endif