summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclExecute.c2
-rw-r--r--tests/all.tcl7
-rw-r--r--win/tclWinConsole.c6
-rw-r--r--win/tclWinFile.c2
-rw-r--r--win/tclWinInit.c2
-rw-r--r--win/tclWinNotify.c6
-rw-r--r--win/tclWinPipe.c6
-rw-r--r--win/tclWinSerial.c8
-rw-r--r--win/tclWinSock.c4
-rw-r--r--win/tclWinThrd.c2
-rw-r--r--win/tclWinTime.c4
11 files changed, 27 insertions, 22 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index ec0d041..e844df6 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -2079,7 +2079,7 @@ TEBCresume(
*/
Tcl_Obj *objPtr, *valuePtr, *value2Ptr, *part1Ptr, *part2Ptr, *tmpPtr;
- Tcl_Obj **objv;
+ Tcl_Obj **objv = NULL;
int objc = 0;
int opnd, length, pcAdjustment;
Var *varPtr, *arrayPtr;
diff --git a/tests/all.tcl b/tests/all.tcl
index 287de1f..52c8763 100644
--- a/tests/all.tcl
+++ b/tests/all.tcl
@@ -25,4 +25,9 @@ if {[singleProcess]} {
set ErrorOnFailures [info exists env(ERROR_ON_FAILURES)]
unset -nocomplain env(ERROR_ON_FAILURES)
if {[runAllTests] && $ErrorOnFailures} {exit 1}
-proc exit args {}
+# if calling direct only (avoid rewrite exit if inlined or interactive):
+if { [info exists ::argv0] && [file tail $::argv0] eq [file tail [info script]]
+ && !([info exists ::tcl_interactive] && $::tcl_interactive)
+} {
+ proc exit args {}
+} \ No newline at end of file
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index 3668ae3..e1059ca 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -1055,7 +1055,7 @@ WaitForRead(
return 1;
}
- if (PeekConsoleInput(handle, &input, 1, &count) == FALSE) {
+ if (PeekConsoleInputW(handle, &input, 1, &count) == FALSE) {
/*
* Check to see if the peek failed because of EOF.
*/
@@ -1357,7 +1357,7 @@ TclWinOpenConsoleChannel(
modes |= ENABLE_LINE_INPUT;
SetConsoleMode(infoPtr->handle, modes);
- infoPtr->reader.readyEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
+ infoPtr->reader.readyEvent = CreateEventW(NULL, TRUE, TRUE, NULL);
infoPtr->reader.thread = CreateThread(NULL, 256, ConsoleReaderThread,
TclPipeThreadCreateTI(&infoPtr->reader.TI, infoPtr,
infoPtr->reader.readyEvent), 0, NULL);
@@ -1366,7 +1366,7 @@ TclWinOpenConsoleChannel(
if (permissions & TCL_WRITABLE) {
- infoPtr->writer.readyEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
+ infoPtr->writer.readyEvent = CreateEventW(NULL, TRUE, TRUE, NULL);
infoPtr->writer.thread = CreateThread(NULL, 256, ConsoleWriterThread,
TclPipeThreadCreateTI(&infoPtr->writer.TI, infoPtr,
infoPtr->writer.readyEvent), 0, NULL);
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 4d2c474..880adc0 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -3300,7 +3300,7 @@ TclWinFileOwned(
native = Tcl_FSGetNativePath(pathPtr);
- if (GetNamedSecurityInfo((LPTSTR) native, SE_FILE_OBJECT,
+ if (GetNamedSecurityInfoW((LPWSTR) native, SE_FILE_OBJECT,
OWNER_SECURITY_INFORMATION, &ownerSid, NULL, NULL, NULL,
&secd) != ERROR_SUCCESS) {
/*
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 1669ede..0d37d1a 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -297,7 +297,7 @@ AppendEnvironment(
Tcl_SplitPath(buf, &pathc, &pathv);
/*
- * The lstrcmpi() will work even if pathv[pathc-1] is random UTF-8
+ * The lstrcmpiA() will work even if pathv[pathc-1] is random UTF-8
* chars because I know shortlib is ascii.
*/
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c
index 8dc0d7c..2ab4efa 100644
--- a/win/tclWinNotify.c
+++ b/win/tclWinNotify.c
@@ -125,7 +125,7 @@ Tcl_InitNotifier(void)
tsdPtr->hwnd = NULL;
tsdPtr->thread = GetCurrentThreadId();
- tsdPtr->event = CreateEvent(NULL, TRUE /* manual */,
+ tsdPtr->event = CreateEventW(NULL, TRUE /* manual */,
FALSE /* !signaled */, NULL);
return tsdPtr;
@@ -247,7 +247,7 @@ Tcl_AlertNotifier(
EnterCriticalSection(&tsdPtr->crit);
if (!tsdPtr->pending) {
- PostMessage(tsdPtr->hwnd, WM_WAKEUP, 0, 0);
+ PostMessageW(tsdPtr->hwnd, WM_WAKEUP, 0, 0);
}
tsdPtr->pending = 1;
LeaveCriticalSection(&tsdPtr->crit);
@@ -407,7 +407,7 @@ NotifierProc(
tsdPtr->pending = 0;
LeaveCriticalSection(&tsdPtr->crit);
} else if (message != WM_TIMER) {
- return DefWindowProc(hwnd, message, wParam, lParam);
+ return DefWindowProcW(hwnd, message, wParam, lParam);
}
/*
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 75f5034..86dff45 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -1789,7 +1789,7 @@ TclpCreateCommandChannel(
* Start the background reader thread.
*/
- infoPtr->readable = CreateEvent(NULL, TRUE, TRUE, NULL);
+ infoPtr->readable = CreateEventW(NULL, TRUE, TRUE, NULL);
infoPtr->readThread = CreateThread(NULL, 256, PipeReaderThread,
TclPipeThreadCreateTI(&infoPtr->readTI, infoPtr, infoPtr->readable),
0, NULL);
@@ -1804,7 +1804,7 @@ TclpCreateCommandChannel(
* Start the background writer thread.
*/
- infoPtr->writable = CreateEvent(NULL, TRUE, TRUE, NULL);
+ infoPtr->writable = CreateEventW(NULL, TRUE, TRUE, NULL);
infoPtr->writeThread = CreateThread(NULL, 256, PipeWriterThread,
TclPipeThreadCreateTI(&infoPtr->writeTI, infoPtr, infoPtr->writable),
0, NULL);
@@ -3290,7 +3290,7 @@ TclPipeThreadCreateTI(
#else
pipeTI = ckalloc(sizeof(TclPipeThreadInfo));
#endif /* !_PTI_USE_CKALLOC */
- pipeTI->evControl = CreateEvent(NULL, FALSE, FALSE, NULL);
+ pipeTI->evControl = CreateEventW(NULL, FALSE, FALSE, NULL);
pipeTI->state = PTI_STATE_IDLE;
pipeTI->clientData = clientData;
pipeTI->evWakeUp = wakeEvent;
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index f8ec79d..65af10f 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -1291,7 +1291,7 @@ SerialWriterThread(
buf = infoPtr->writeBuf;
toWrite = infoPtr->toWrite;
- myWrite.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ myWrite.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
/*
* Loop until all of the bytes are written or an error occurs.
@@ -1486,15 +1486,15 @@ TclWinOpenSerialChannel(
InitializeCriticalSection(&infoPtr->csWrite);
if (permissions & TCL_READABLE) {
- infoPtr->osRead.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ infoPtr->osRead.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
}
if (permissions & TCL_WRITABLE) {
/*
* Initially the channel is writable and the writeThread is idle.
*/
- infoPtr->osWrite.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
- infoPtr->evWritable = CreateEvent(NULL, TRUE, TRUE, NULL);
+ infoPtr->osWrite.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
+ infoPtr->evWritable = CreateEventW(NULL, TRUE, TRUE, NULL);
infoPtr->writeThread = CreateThread(NULL, 256, SerialWriterThread,
TclPipeThreadCreateTI(&infoPtr->writeTI, infoPtr,
infoPtr->evWritable), 0, NULL);
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 8c12796..de59941 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -3245,14 +3245,14 @@ SocketProc(
TcpFdList *fds = NULL;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
#ifdef _WIN64
- GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ GetWindowLongPtrW(hwnd, GWLP_USERDATA);
#else
GetWindowLong(hwnd, GWL_USERDATA);
#endif
switch (message) {
default:
- return DefWindowProc(hwnd, message, wParam, lParam);
+ return DefWindowProcW(hwnd, message, wParam, lParam);
break;
case WM_CREATE:
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index d169ebb..d649310 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -682,7 +682,7 @@ Tcl_ConditionWait(
*/
if (tsdPtr->flags == WIN_THREAD_UNINIT) {
- tsdPtr->condEvent = CreateEvent(NULL, TRUE /* manual reset */,
+ tsdPtr->condEvent = CreateEventW(NULL, TRUE /* manual reset */,
FALSE /* non signaled */, NULL);
tsdPtr->nextPtr = NULL;
tsdPtr->prevPtr = NULL;
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index f42370b..f18d63e 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -548,8 +548,8 @@ NativeGetMicroseconds(void)
DWORD id;
InitializeCriticalSection(&timeInfo.cs);
- timeInfo.readyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- timeInfo.exitEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ timeInfo.readyEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
+ timeInfo.exitEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
timeInfo.calibrationThread = CreateThread(NULL, 256,
CalibrationThread, (LPVOID) NULL, 0, &id);
SetThreadPriority(timeInfo.calibrationThread,