diff options
-rw-r--r-- | unix/tclEpollNotfy.c | 2 | ||||
-rw-r--r-- | unix/tclKqueueNotfy.c | 2 | ||||
-rw-r--r-- | unix/tclSelectNotfy.c | 2 | ||||
-rw-r--r-- | unix/tclUnixNotfy.c | 21 |
4 files changed, 13 insertions, 14 deletions
diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c index 076e02b..3059643 100644 --- a/unix/tclEpollNotfy.c +++ b/unix/tclEpollNotfy.c @@ -12,7 +12,7 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#ifdef NOTIFIER_EPOLL +#if defined(NOTIFIER_EPOLL) && (!defined(TCL_THREADS) || TCL_THREADS) #define _GNU_SOURCE /* For pipe2(2) */ #include "tclInt.h" diff --git a/unix/tclKqueueNotfy.c b/unix/tclKqueueNotfy.c index 049829e..3fddeea 100644 --- a/unix/tclKqueueNotfy.c +++ b/unix/tclKqueueNotfy.c @@ -13,7 +13,7 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#ifdef NOTIFIER_KQUEUE +#if defined(NOTIFIER_KQUEUE) && (!defined(TCL_THREADS) || TCL_THREADS) #include "tclInt.h" #ifndef HAVE_COREFOUNDATION /* Darwin/Mac OS X CoreFoundation notifier is diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c index 4bdfaef..3172d6a 100644 --- a/unix/tclSelectNotfy.c +++ b/unix/tclSelectNotfy.c @@ -11,7 +11,7 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#if !defined(NOTIFIER_EPOLL) && !defined(NOTIFIER_KQUEUE) +#if (!defined(NOTIFIER_EPOLL) && !defined(NOTIFIER_KQUEUE)) || (defined(TCL_THREADS) && !TCL_THREADS) #include "tclInt.h" #ifndef HAVE_COREFOUNDATION /* Darwin/Mac OS X CoreFoundation notifier is diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index ccae39b..6572b39 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -17,24 +17,24 @@ * Static routines defined in this file. */ -#ifdef NOTIFIER_SELECT -#if !defined(TCL_THREADS) || TCL_THREADS +static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); +#if defined(TCL_THREADS) && !TCL_THREADS +# undef NOTIFIER_EPOLL +# undef NOTIFIER_KQUEUE +# define NOTIFIER_SELECT +#elif !defined(NOTIFIER_EPOLL) && !defined(NOTIFIER_KQUEUE) +# define NOTIFIER_SELECT static TCL_NORETURN void NotifierThreadProc(ClientData clientData); -#if defined(HAVE_PTHREAD_ATFORK) +# if defined(HAVE_PTHREAD_ATFORK) static void AtForkChild(void); -#endif /* HAVE_PTHREAD_ATFORK */ -#endif /* TCL_THREADS */ -#endif /* NOTIFIER_SELECT */ -static int FileHandlerEventProc(Tcl_Event *evPtr, int flags); +# endif /* HAVE_PTHREAD_ATFORK */ -#ifdef NOTIFIER_SELECT -#if !defined(TCL_THREADS) || TCL_THREADS /* *---------------------------------------------------------------------- * * StartNotifierThread -- * - * Start a notfier thread and wait for the notifier pipe to be created. + * Start a notifier thread and wait for the notifier pipe to be created. * * Results: * None. @@ -70,7 +70,6 @@ StartNotifierThread(const char *proc) pthread_mutex_unlock(¬ifierInitMutex); } } -#endif /* TCL_THREADS */ #endif /* NOTIFIER_SELECT */ /* |