Back out change to h2xs till it passes its test.
[p5sagit/p5-mst-13.2.git] / thread.h
index c76534f..a82c01b 100644 (file)
--- a/thread.h
+++ b/thread.h
@@ -306,8 +306,18 @@ void Perl_atfork_lock(void);
 void Perl_atfork_unlock(void);
 
 #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
+#    ifdef HAS_FORK
+#      define PTHREAD_ATFORK(prepare,parent,child)             \
+        Perl_croak(aTHX_ "No pthread_atfork() -- fork() too unsafe");
+#    else
+#      define PTHREAD_ATFORK(prepare,parent,child)             \
+        NOOP
+#    endif
+#  endif
 #endif
 
 #ifndef THREAD_RET_TYPE