summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-08 11:22:05 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-08 11:22:05 (GMT)
commitd321f40d3b3cbfd53a3d17ffad1ecac4c81b97bd (patch)
tree53c7a103c3bfd7738ff2bda3030cfd3f01275919
parentb9098ee927b24f571428a5bdbd0f73a14c902388 (diff)
parent4b87d73b631c0e6b946c1e7a43b9cbb528674b18 (diff)
downloadtcl-d321f40d3b3cbfd53a3d17ffad1ecac4c81b97bd.zip
tcl-d321f40d3b3cbfd53a3d17ffad1ecac4c81b97bd.tar.gz
tcl-d321f40d3b3cbfd53a3d17ffad1ecac4c81b97bd.tar.bz2
merge trunk
-rw-r--r--win/tclWinInt.h6
-rw-r--r--win/tclWinSock.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/win/tclWinInt.h b/win/tclWinInt.h
index 882b811..22ad8e9 100644
--- a/win/tclWinInt.h
+++ b/win/tclWinInt.h
@@ -33,6 +33,12 @@
# define TCL_I_MODIFIER ""
#endif
+#ifdef _WIN64
+# define TCL_I_MODIFIER "I"
+#else
+# define TCL_I_MODIFIER ""
+#endif
+
/*
* Declarations of functions that are not accessible by way of the
* stubs table.
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index ca49d22..9b181a6 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1403,7 +1403,7 @@ Tcl_OpenTcpClient(
return NULL;
}
- sprintf(channelName, "sock%Id", (size_t) infoPtr->sockets->fd);
+ sprintf(channelName, "sock%" TCL_I_MODIFIER "u", (size_t) infoPtr->sockets->fd);
infoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
infoPtr, (TCL_READABLE | TCL_WRITABLE));
@@ -1466,7 +1466,7 @@ Tcl_MakeTcpClientChannel(
infoPtr->selectEvents = FD_READ | FD_CLOSE | FD_WRITE;
SendMessage(tsdPtr->hwnd, SOCKET_SELECT, (WPARAM)SELECT, (LPARAM)infoPtr);
- sprintf(channelName, "sock%Id", (size_t) infoPtr->sockets->fd);
+ sprintf(channelName, "sock%" TCL_I_MODIFIER "u", (size_t) infoPtr->sockets->fd);
infoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
infoPtr, (TCL_READABLE | TCL_WRITABLE));
Tcl_SetChannelOption(NULL, infoPtr->channel, "-translation", "auto crlf");
@@ -1519,7 +1519,7 @@ Tcl_OpenTcpServer(
infoPtr->acceptProc = acceptProc;
infoPtr->acceptProcData = acceptProcData;
- sprintf(channelName, "sock%Id", (size_t) infoPtr->sockets->fd);
+ sprintf(channelName, "sock%" TCL_I_MODIFIER "u", (size_t) infoPtr->sockets->fd);
infoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
infoPtr, 0);
@@ -1625,7 +1625,7 @@ TcpAccept(
SendMessage(tsdPtr->hwnd, SOCKET_SELECT, (WPARAM) SELECT,
(LPARAM) newInfoPtr);
- sprintf(channelName, "sock%Id", (size_t) newInfoPtr->sockets->fd);
+ sprintf(channelName, "sock%" TCL_I_MODIFIER "u", (size_t) newInfoPtr->sockets->fd);
newInfoPtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName,
newInfoPtr, (TCL_READABLE | TCL_WRITABLE));
if (Tcl_SetChannelOption(NULL, newInfoPtr->channel, "-translation",