summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2023-11-22 19:20:12 (GMT)
committerdgp <dgp@users.sourceforge.net>2023-11-22 19:20:12 (GMT)
commitca0654d3b984b0cb57abf74e7eef420a6d6d04c9 (patch)
tree362394bea3c02ca87ea7ea1e536bc65f2f9fa8a9 /win
parentcd515c4321f079a9a2e4dd72e769da7a88a45b14 (diff)
parent9977a1183593d954bcb6c63c24502b8eb5220e65 (diff)
downloadtcl-ca0654d3b984b0cb57abf74e7eef420a6d6d04c9.zip
tcl-ca0654d3b984b0cb57abf74e7eef420a6d6d04c9.tar.gz
tcl-ca0654d3b984b0cb57abf74e7eef420a6d6d04c9.tar.bz2
Merge many improvements from trunk that look good for next rc.
Diffstat (limited to 'win')
-rw-r--r--win/tclWinPipe.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 9f889b2..157547f 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -61,7 +61,7 @@ typedef struct {
typedef struct ProcInfo {
HANDLE hProcess;
- size_t dwProcessId;
+ int dwProcessId;
struct ProcInfo *nextPtr;
} ProcInfo;
@@ -864,7 +864,7 @@ TclpCloseFile(
*--------------------------------------------------------------------------
*/
-size_t
+Tcl_Size
TclpGetPid(
Tcl_Pid pid) /* The HANDLE of the child process. */
{
@@ -874,13 +874,13 @@ TclpGetPid(
Tcl_MutexLock(&pipeMutex);
for (infoPtr = procList; infoPtr != NULL; infoPtr = infoPtr->nextPtr) {
- if (infoPtr->dwProcessId == (size_t)pid) {
+ if (infoPtr->dwProcessId == (Tcl_Size)pid) {
Tcl_MutexUnlock(&pipeMutex);
return infoPtr->dwProcessId;
}
}
Tcl_MutexUnlock(&pipeMutex);
- return TCL_INDEX_NONE;
+ return -1;
}
/*
@@ -1168,7 +1168,7 @@ TclpCreateProcess(
WaitForInputIdle(procInfo.hProcess, 5000);
CloseHandle(procInfo.hThread);
- *pidPtr = (Tcl_Pid) (size_t) procInfo.dwProcessId;
+ *pidPtr = (Tcl_Pid)INT2PTR(procInfo.dwProcessId);
if (*pidPtr != 0) {
TclWinAddProcess(procInfo.hProcess, procInfo.dwProcessId);
}
@@ -2564,7 +2564,7 @@ Tcl_WaitPid(
prevPtrPtr = &procList;
for (infoPtr = procList; infoPtr != NULL;
prevPtrPtr = &infoPtr->nextPtr, infoPtr = infoPtr->nextPtr) {
- if (infoPtr->dwProcessId == (size_t) pid) {
+ if (infoPtr->dwProcessId == (Tcl_Size)pid) {
*prevPtrPtr = infoPtr->nextPtr;
break;
}
@@ -2674,7 +2674,7 @@ Tcl_WaitPid(
} else {
errno = ECHILD;
*statPtr = 0xC0000000 | ECHILD;
- result = (Tcl_Pid) -1;
+ result = (Tcl_Pid)-1;
}
/*
@@ -2708,7 +2708,7 @@ Tcl_WaitPid(
void
TclWinAddProcess(
void *hProcess, /* Handle to process */
- size_t id) /* Global process identifier */
+ Tcl_Size id) /* Global process identifier */
{
ProcInfo *procPtr = (ProcInfo *)Tcl_Alloc(sizeof(ProcInfo));