summaryrefslogtreecommitdiffstats
path: root/win/tclWinThrd.c
diff options
context:
space:
mode:
authormdejong <mdejong>2003-01-14 02:06:10 (GMT)
committermdejong <mdejong>2003-01-14 02:06:10 (GMT)
commit34dbae7d6c29485684a2de0432b01702ce074d54 (patch)
tree023efb988c8483959418c28474b1c576859a43d1 /win/tclWinThrd.c
parentbcfd8c29092de21e66b7a7ca7a9a682b07514c54 (diff)
downloadtcl-34dbae7d6c29485684a2de0432b01702ce074d54.zip
tcl-34dbae7d6c29485684a2de0432b01702ce074d54.tar.gz
tcl-34dbae7d6c29485684a2de0432b01702ce074d54.tar.bz2
Fix mingw build problems and compiler warnings.
* generic/tcl.h: Add if defined(__MINGW32__) check to code that sets the TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER. * generic/tclClock.c (FormatClock): Don't define savedTimeZone and savedTZEnv if we are not going to use them. * generic/tclEnv.c: Add cast to avoid warning. * win/tclWinChan.c: Use DWORD instead of int to avoid compiler warning. * win/tclWinThrd.c: Only define allocLock, allocLockPtr, and dataKey when TCL_THREADS is defined. This avoid a compiler warning about unused variables.
Diffstat (limited to 'win/tclWinThrd.c')
-rw-r--r--win/tclWinThrd.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 80b6be0..f0ee02c 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinThrd.c,v 1.23 2002/12/10 00:34:15 hobbs Exp $
+ * RCS: @(#) $Id: tclWinThrd.c,v 1.24 2003/01/14 02:06:11 mdejong Exp $
*/
#include "tclWinInt.h"
@@ -40,9 +40,13 @@ static CRITICAL_SECTION initLock;
* For obvious reasons, cannot use any dyamically allocated storage.
*/
+#ifdef TCL_THREADS
+
static CRITICAL_SECTION allocLock;
static Tcl_Mutex allocLockPtr = (Tcl_Mutex) &allocLock;
+#endif /* TCL_THREADS */
+
/*
* The joinLock serializes Create- and ExitThread. This is necessary to
* prevent a race where a new joinable thread exits before the creating
@@ -69,6 +73,8 @@ static CRITICAL_SECTION joinLock;
* The per-thread event and queue pointers.
*/
+#ifdef TCL_THREADS
+
typedef struct ThreadSpecificData {
HANDLE condEvent; /* Per-thread condition event */
struct ThreadSpecificData *nextPtr; /* Queue pointers */
@@ -77,6 +83,8 @@ typedef struct ThreadSpecificData {
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;
+#endif /* TCL_THREADS */
+
/*
* State bits for the thread.
* WIN_THREAD_UNINIT Uninitialized. Must be zero because