From 9195d0b1bc6a7d80e16f86172efd83c4cb73919b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 20 Jul 2023 20:52:03 +0000 Subject: Fix handling of pre-built libtommath.dll on win64-arm --- win/Makefile.in | 10 +++++++--- win/tclWinPipe.c | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/win/Makefile.in b/win/Makefile.in index e702c3e..75c34cb 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -614,10 +614,14 @@ ${ZLIB_DLL_FILE}: ${TCL_STUB_LIB_FILE} # use pre-built libtommath.dll ${TOMMATH_DLL_FILE}: ${TCL_STUB_LIB_FILE} - @if test "@TOMMATH_LIBS@set" != "${TOMMATH_DIR_NATIVE}/win32/tommath.libset" ; then \ - $(COPY) $(TOMMATH_DIR)/win64/${TOMMATH_DLL_FILE} ${TOMMATH_DLL_FILE}; \ - else \ + @if test "@TOMMATH_LIBS@set" = "${TOMMATH_DIR_NATIVE}/win64-arm/tommath.libset" ; then \ + $(COPY) $(TOMMATH_DIR)/win64-arm/${TOMMATH_DLL_FILE} ${TOMMATH_DLL_FILE}; \ + elif test "@TOMMATH_LIBS@set" = "${TOMMATH_DIR_NATIVE}/win64-arm/libtommath.dll.aset" ; then \ + $(COPY) $(TOMMATH_DIR)/win64-arm/${TOMMATH_DLL_FILE} ${TOMMATH_DLL_FILE}; \ + elif test "@TOMMATH_LIBS@set" = "${TOMMATH_DIR_NATIVE}/win32/tommath.libset" ; then \ $(COPY) $(TOMMATH_DIR)/win32/${TOMMATH_DLL_FILE} ${TOMMATH_DLL_FILE}; \ + else \ + $(COPY) $(TOMMATH_DIR)/win64/${TOMMATH_DLL_FILE} ${TOMMATH_DLL_FILE}; \ fi; # Add the object extension to the implicit rules. By default .obj is not diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 048f0e8..cb6177c 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -869,7 +869,7 @@ TclpGetPid( Tcl_MutexLock(&pipeMutex); for (infoPtr = procList; infoPtr != NULL; infoPtr = infoPtr->nextPtr) { - if (infoPtr->dwProcessId == PTR2INT(pid)) { + if (infoPtr->dwProcessId == PTR2UINT(pid)) { Tcl_MutexUnlock(&pipeMutex); return infoPtr->dwProcessId; } @@ -2565,7 +2565,7 @@ Tcl_WaitPid( prevPtrPtr = &procList; for (infoPtr = procList; infoPtr != NULL; prevPtrPtr = &infoPtr->nextPtr, infoPtr = infoPtr->nextPtr) { - if (infoPtr->dwProcessId == PTR2INT(pid)) { + if (infoPtr->dwProcessId == PTR2UINT(pid)) { *prevPtrPtr = infoPtr->nextPtr; break; } -- cgit v0.12