pthread_atfork on FreeBSD - Part 1: #ifdef HAS_PTHREAD_ATFORK
coral [Thu, 12 Jul 2001 16:16:50 +0000 (09:16 -0700)]
Message-Id: <200107122316.f6CNGoq09171@moonlight.crystalflame.net>

p4raw-id: //depot/perl@11336

thread.h

index c76534f..8f475a0 100644 (file)
--- a/thread.h
+++ b/thread.h
@@ -306,8 +306,12 @@ 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
+#    define PTHREAD_ATFORK(prepare,parent,child)
+#  endif
 #endif
 
 #ifndef THREAD_RET_TYPE