diff options
Diffstat (limited to 'generic/tclIOSock.c')
-rw-r--r-- | generic/tclIOSock.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c index 3ed2122..159f3da 100644 --- a/generic/tclIOSock.c +++ b/generic/tclIOSock.c @@ -83,34 +83,30 @@ TclSockGetPort(interp, string, proto, portPtr) *---------------------------------------------------------------------- */ -#ifdef _WIN64 - /* See bug 510001: TclSockMinimumBuffers needs plat imp */ -# define TclSockMinimumBuffers TclSockMinimumBuffersWin64 +#undef TclSockMinimumBuffers +#ifndef _WIN32 +# define SOCKET int #endif int TclSockMinimumBuffers(sock, size) -#ifdef _WIN64 - SOCKET sock; /* Socket file descriptor */ -#else - int sock; /* Socket file descriptor */ -#endif + void *sock; /* Socket file descriptor */ int size; /* Minimum buffer size */ { int current; socklen_t len; len = sizeof(int); - getsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)¤t, &len); + getsockopt((SOCKET)sock, SOL_SOCKET, SO_SNDBUF, (char *)¤t, &len); if (current < size) { len = sizeof(int); - setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (char *)&size, len); + setsockopt((SOCKET)sock, SOL_SOCKET, SO_SNDBUF, (char *)&size, len); } len = sizeof(int); - getsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)¤t, &len); + getsockopt((SOCKET)sock, SOL_SOCKET, SO_RCVBUF, (char *)¤t, &len); if (current < size) { len = sizeof(int); - setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char *)&size, len); + setsockopt((SOCKET)sock, SOL_SOCKET, SO_RCVBUF, (char *)&size, len); } return TCL_OK; } |