diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-03-29 12:13:42 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-03-29 12:13:42 (GMT) |
commit | 4b80a508c87df4ea40e979f3c5fcef1de2c4afcf (patch) | |
tree | f2303d5b71bad413b0e5107a6f50f4ca6af040c2 | |
parent | 9dc4d62155a906e3cb7a4d11c2332774d2071d83 (diff) | |
download | tcl-bug_510001.zip tcl-bug_510001.tar.gz tcl-bug_510001.tar.bz2 |
better solution for bug-510001bug_510001
it fills a correctly working stub entry for Win64
-rw-r--r-- | generic/tclIOSock.c | 9 | ||||
-rw-r--r-- | generic/tclIntDecls.h | 13 | ||||
-rw-r--r-- | generic/tclStubInit.c | 7 | ||||
-rw-r--r-- | win/tclWinSock.c | 4 |
4 files changed, 31 insertions, 2 deletions
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c index f311912..3ed2122 100644 --- a/generic/tclIOSock.c +++ b/generic/tclIOSock.c @@ -83,9 +83,18 @@ TclSockGetPort(interp, string, proto, portPtr) *---------------------------------------------------------------------- */ +#ifdef _WIN64 + /* See bug 510001: TclSockMinimumBuffers needs plat imp */ +# define TclSockMinimumBuffers TclSockMinimumBuffersWin64 +#endif + int TclSockMinimumBuffers(sock, size) +#ifdef _WIN64 + SOCKET sock; /* Socket file descriptor */ +#else int sock; /* Socket file descriptor */ +#endif int size; /* Minimum buffer size */ { int current; diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 1d831ed..d53acb5 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -1409,4 +1409,17 @@ extern TclIntStubs *tclIntStubsPtr; /* !END!: Do not edit above this line. */ +#ifdef _WIN64 + /* See bug 510001: TclSockMinimumBuffers needs plat imp */ + extern int TclSockMinimumBuffersWin64(unsigned __int64,int); + +# ifdef USE_TCL_STUBS +# undef TclSockMinimumBuffers +# define TclSockMinimumBuffers ((int (*)(SOCKET,int)) \ + tclIntStubsPtr->tclSockMinimumBuffers) +# else +# define TclSockMinimumBuffers TclSockMinimumBuffersWin64 +# endif +#endif + #endif /* _TCLINTDECLS */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 347bdcb..09994b9 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -55,6 +55,13 @@ Tcl_NotifierProcs tclOriginalNotifier = { NULL }; +#ifdef _WIN64 +/* See bug 510001: TclSockMinimumBuffers needs plat imp */ +# undef TclSockMinimumBuffers +# define TclSockMinimumBuffers ((int (*)(int, int)) \ + TclSockMinimumBuffersWin64) +#endif + #ifdef __CYGWIN__ #define TclWinGetPlatformId winGetPlatformId diff --git a/win/tclWinSock.c b/win/tclWinSock.c index f3fe979..a03116a 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -1156,7 +1156,7 @@ CreateSocket(interp, port, host, server, myaddr, myport, async) * Set kernel space buffering */ - TclSockMinimumBuffers((int) sock, TCP_BUFFER_SIZE); + TclSockMinimumBuffers(sock, TCP_BUFFER_SIZE); if (server) { /* @@ -1517,7 +1517,7 @@ Tcl_MakeTcpClientChannel(sock) * Set kernel space buffering and non-blocking. */ - TclSockMinimumBuffers((int) sock, TCP_BUFFER_SIZE); + TclSockMinimumBuffers((SOCKET) sock, TCP_BUFFER_SIZE); infoPtr = NewSocketInfo((SOCKET) sock); |