Not quite so relicy as thought in #11651 (op/concat #4 and #5
[p5sagit/p5-mst-13.2.git] / thread.h
index b14907a..fae53f1 100644 (file)
--- a/thread.h
+++ b/thread.h
@@ -7,6 +7,9 @@
 #ifdef WIN32
 #  include <win32thread.h>
 #else
+#ifdef NETWARE
+#  include <nw5thread.h>
+#else
 #  ifdef OLD_PTHREADS_API /* Here be dragons. */
 #    define DETACH(t) \
     STMT_START {                                               \
@@ -54,6 +57,7 @@
 #    define pthread_mutexattr_default NULL
 #    define pthread_condattr_default  NULL
 #  endif
+#endif /* NETWARE */
 #endif
 
 #ifndef PTHREAD_CREATE
 /* Use an unchecked fetch of thread-specific data instead of a checked one.
  * It would fail if the key were bogus, but if the key were bogus then
  * Really Bad Things would be happening anyway. --dan */
-#if (defined(__ALPHA) && (__VMS_VER >= 70000000)) ||
+#if (defined(__ALPHA) && (__VMS_VER >= 70000000)) || \
     (defined(__alpha) && defined(__osf__)) /* Available only on >= 4.0 */
 #  define HAS_PTHREAD_UNCHECKED_GETSPECIFIC_NP /* Configure test needed */
 #endif
     } STMT_END
 #endif
 
+#ifndef PTHREAD_ATFORK
+#  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
 #  define THREAD_RET_TYPE      void *
 #  define THREAD_RET_CAST(p)   ((void *)(p))