summaryrefslogtreecommitdiffstats
path: root/unix/tclSelectNotfy.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-08-23 13:00:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-08-23 13:00:47 (GMT)
commita5048e8dd92669687e9e6a3e5e040477366a5b69 (patch)
tree14fc254a3b62a1b608d07608c6b3aab3fe073d5a /unix/tclSelectNotfy.c
parent94b338844e5af1659858a5446714c65fcbaecf54 (diff)
parenta5448b6c8bdb4aeac833b411b94637047889cbd8 (diff)
downloadtcl-a5048e8dd92669687e9e6a3e5e040477366a5b69.zip
tcl-a5048e8dd92669687e9e6a3e5e040477366a5b69.tar.gz
tcl-a5048e8dd92669687e9e6a3e5e040477366a5b69.tar.bz2
Make everything compile warning-free when TCL_THREADS=0
Diffstat (limited to 'unix/tclSelectNotfy.c')
-rw-r--r--unix/tclSelectNotfy.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c
index f7e61c9..732e4c9 100644
--- a/unix/tclSelectNotfy.c
+++ b/unix/tclSelectNotfy.c
@@ -203,7 +203,9 @@ static Tcl_ThreadId notifierThread;
*/
static sigset_t notifierSigMask;
+#ifndef HAVE_PSELECT
static sigset_t allSigMask;
+#endif /* HAVE_PSELECT */
#endif /* TCL_THREADS */
@@ -279,9 +281,11 @@ extern unsigned char __stdcall TranslateMessage(const MSG *);
* Threaded-cygwin specific constants and functions in this file:
*/
+#if TCL_THREADS && defined(__CYGWIN__)
static const wchar_t className[] = L"TclNotifier";
static unsigned int __stdcall NotifierProc(void *hwnd, unsigned int message,
void *wParam, void *lParam);
+#endif /* TCL_THREADS && defined(__CYGWIN__) */
#ifdef __cplusplus
}
#endif
@@ -594,7 +598,7 @@ TclpDeleteFileHandler(
ckfree(filePtr);
}
-#if defined(__CYGWIN__)
+#if TCL_THREADS && defined(__CYGWIN__)
static unsigned int __stdcall
NotifierProc(
@@ -916,7 +920,7 @@ TclpWaitForEvent(
int
TclAsyncNotifier(
int sigNumber, /* Signal number. */
- Tcl_ThreadId threadId, /* Target thread. */
+ TCL_UNUSED(Tcl_ThreadId), /* Target thread. */
TCL_UNUSED(ClientData), /* Notifier data. */
int *flagPtr, /* Flag to mark. */
int value) /* Value of mark. */
@@ -946,6 +950,10 @@ TclAsyncNotifier(
*/
pthread_kill((pthread_t) notifierThread, sigNumber);
+#else
+ (void)sigNumber;
+ (void)flagPtr;
+ (void)value;
#endif
return 0;
}