summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/tclWinChan.c4
-rw-r--r--win/tclWinConsole.c2
-rw-r--r--win/tclWinDde.c6
-rw-r--r--win/tclWinReg.c2
-rw-r--r--win/tclWinSerial.c2
-rw-r--r--win/tclWinSock.c2
-rw-r--r--win/tclWinThrd.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index b35c380..0f17834 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -1224,7 +1224,7 @@ TclpGetDefaultStdChannel(
HANDLE handle;
int mode = -1;
char *bufMode = NULL;
- DWORD handleId = (DWORD)INVALID_HANDLE_VALUE;
+ DWORD handleId = (DWORD)-1;
/* Standard handle to retrieve. */
switch (type) {
@@ -1337,7 +1337,7 @@ TclWinOpenFileChannel(
infoPtr->flags = appendMode;
infoPtr->handle = handle;
infoPtr->dirty = 0;
- wsprintfA(channelName, "file%lx", (int) infoPtr);
+ wsprintfA(channelName, "file%lx", PTR2INT(infoPtr));
infoPtr->channel = Tcl_CreateChannel(&fileChannelType, channelName,
(ClientData) infoPtr, permissions);
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index ebba41a..8be8e09 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -1362,7 +1362,7 @@ TclWinOpenConsoleChannel(
* for instance).
*/
- wsprintfA(channelName, "file%lx", (int) infoPtr);
+ wsprintfA(channelName, "file%lx", PTR2INT(infoPtr));
infoPtr->channel = Tcl_CreateChannel(&consoleChannelType, channelName,
(ClientData) infoPtr, permissions);
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index df6507b..9f39b37 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -211,7 +211,7 @@ Initialize(void)
if (ddeInstance == 0) {
Tcl_MutexLock(&ddeMutex);
if (ddeInstance == 0) {
- if (DdeInitialize(&ddeInstance, DdeServerProc,
+ if (DdeInitialize(&ddeInstance, (PFNCALLBACK) DdeServerProc,
CBF_SKIP_REGISTRATIONS | CBF_SKIP_UNREGISTRATIONS
| CBF_FAIL_POKES, 0) != DMLERR_NO_ERROR) {
ddeInstance = 0;
@@ -957,7 +957,7 @@ DdeClientWindowProc(
(struct DdeEnumServices *) lpcs->lpCreateParams;
#ifdef _WIN64
- SetWindowLongPtr(hwnd, GWLP_USERDATA, (long)es);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) es);
#else
SetWindowLong(hwnd, GWL_USERDATA, (long)es);
#endif
@@ -1032,7 +1032,7 @@ DdeEnumWindowsCallback(
HWND hwndTarget,
LPARAM lParam)
{
- DWORD dwResult = 0;
+ DWORD_PTR dwResult = 0;
struct DdeEnumServices *es = (struct DdeEnumServices *) lParam;
SendMessageTimeout(hwndTarget, WM_DDE_INITIATE, (WPARAM)es->hwnd,
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index f4bdd00..8eaf2a7 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -1437,7 +1437,7 @@ BroadcastValue(
Tcl_Obj *CONST objv[]) /* Argument values. */
{
LRESULT result;
- DWORD sendResult;
+ DWORD_PTR sendResult;
UINT timeout = 3000;
int len;
CONST char *str;
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index bb26e23..fb092ff 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -1499,7 +1499,7 @@ TclWinOpenSerialChannel(
* are shared between multiple channels (stdin/stdout).
*/
- wsprintfA(channelName, "file%lx", (int) infoPtr);
+ wsprintfA(channelName, "file%lx", PTR2INT(infoPtr));
infoPtr->channel = Tcl_CreateChannel(&serialChannelType, channelName,
(ClientData) infoPtr, permissions);
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index a365b49..1bf4f97 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1326,7 +1326,7 @@ Tcl_MakeTcpClientChannel(
* Set kernel space buffering and non-blocking.
*/
- TclSockMinimumBuffers((int) sock, TCP_BUFFER_SIZE);
+ TclSockMinimumBuffers(PTR2INT(sock), TCP_BUFFER_SIZE);
infoPtr = NewSocketInfo((SOCKET) sock);
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 4a4e7f4..8544e71 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -260,7 +260,7 @@ TclpThreadExit(
Tcl_ThreadId
Tcl_GetCurrentThread(void)
{
- return (Tcl_ThreadId) GetCurrentThreadId();
+ return (Tcl_ThreadId) INT2PTR(GetCurrentThreadId());
}
/*