diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinChan.c | 8 | ||||
-rw-r--r-- | win/tclWinThrd.c | 10 |
2 files changed, 13 insertions, 5 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c index e6b61b3..3799ee5 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.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: tclWinChan.c,v 1.26 2002/11/27 22:57:18 davygrvy Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.27 2003/01/14 02:06:11 mdejong Exp $ */ #include "tclWinInt.h" @@ -467,7 +467,7 @@ FileSeekProc(instanceData, offset, mode, errorCodePtr) oldPos = SetFilePointer(infoPtr->handle, (LONG)0, &oldPosHigh, FILE_CURRENT); if (oldPos == INVALID_SET_FILE_POINTER) { - int winError = GetLastError(); + DWORD winError = GetLastError(); if (winError != NO_ERROR) { TclWinConvertError(winError); *errorCodePtr = errno; @@ -479,7 +479,7 @@ FileSeekProc(instanceData, offset, mode, errorCodePtr) newPos = SetFilePointer(infoPtr->handle, (LONG) offset, &newPosHigh, moveMethod); if (newPos == INVALID_SET_FILE_POINTER) { - int winError = GetLastError(); + DWORD winError = GetLastError(); if (winError != NO_ERROR) { TclWinConvertError(winError); *errorCodePtr = errno; @@ -540,7 +540,7 @@ FileWideSeekProc(instanceData, offset, mode, errorCodePtr) newPos = SetFilePointer(infoPtr->handle, (LONG) offset, &newPosHigh, moveMethod); if (newPos == INVALID_SET_FILE_POINTER) { - int winError = GetLastError(); + DWORD winError = GetLastError(); if (winError != NO_ERROR) { TclWinConvertError(winError); *errorCodePtr = errno; 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 |