diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-05-22 20:10:21 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-05-22 20:10:21 (GMT) |
| commit | b729965a3c4258862bc075facb0291c0c765cd57 (patch) | |
| tree | 7c7ab2033bacc9629720f18451045082e515a7f2 /unix/tclUnixNotfy.c | |
| parent | 708eadd19e5581da93b7d8e801ffe977e6e1376f (diff) | |
| download | tcl-b729965a3c4258862bc075facb0291c0c765cd57.zip tcl-b729965a3c4258862bc075facb0291c0c765cd57.tar.gz tcl-b729965a3c4258862bc075facb0291c0c765cd57.tar.bz2 | |
Fix build with TCL_THREADS=0 on Linux/other without epoll or kqueu support. In that case, fallback to select notifier
Diffstat (limited to 'unix/tclUnixNotfy.c')
| -rw-r--r-- | unix/tclUnixNotfy.c | 21 |
1 files changed, 10 insertions, 11 deletions
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 */ /* |
