Not quite so relicy as thought in #11651 (op/concat #4 and #5
[p5sagit/p5-mst-13.2.git] / thread.h
index a1e8fdc..fae53f1 100644 (file)
--- a/thread.h
+++ b/thread.h
 #endif
 
 #ifndef PTHREAD_ATFORK
-#  define PTHREAD_ATFORK(prepare,parent,child)                 \
-    pthread_atfork(prepare,parent,child)
+#  ifdef HAS_PTHREAD_ATFORK
+#    define PTHREAD_ATFORK(prepare,parent,child)               \
+       pthread_atfork(prepare,parent,child)
+#  else
+#    define PTHREAD_ATFORK(prepare,parent,child)               \
+       NOOP
+#  endif
 #endif
 
 #ifndef THREAD_RET_TYPE
@@ -461,7 +466,3 @@ typedef struct condpair {
 #ifndef INIT_THREADS
 #  define INIT_THREADS NOOP
 #endif
-
-#ifndef PTHREAD_ATFORK
-#  define PTHREAD_ATFORK(prepare,parent,child) NOOP
-#endif