diff options
| author | dgp <dgp@users.sourceforge.net> | 2017-04-11 14:14:05 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2017-04-11 14:14:05 (GMT) |
| commit | bc2940927e48190e91f3dd7a90274411eecbccc9 (patch) | |
| tree | 72af08cb803c98359747f491a103cb4282b777d3 /generic/tclIOSock.c | |
| parent | 5c21b9c7c7e7f6442ed8b09ce672495f60df5e87 (diff) | |
| parent | 26f98a5e562b865e82adcc6b7de05df4b0fa07de (diff) | |
| download | tcl-bc2940927e48190e91f3dd7a90274411eecbccc9.zip tcl-bc2940927e48190e91f3dd7a90274411eecbccc9.tar.gz tcl-bc2940927e48190e91f3dd7a90274411eecbccc9.tar.bz2 | |
merge trunk
Diffstat (limited to 'generic/tclIOSock.c')
| -rw-r--r-- | generic/tclIOSock.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c index 8ad268a..82d2fc1 100644 --- a/generic/tclIOSock.c +++ b/generic/tclIOSock.c @@ -12,7 +12,9 @@ #include "tclInt.h" #if defined(_WIN32) && defined(UNICODE) -/* On Windows, we need to do proper Unicode->UTF-8 conversion. */ +/* + * On Windows, we need to do proper Unicode->UTF-8 conversion. + */ typedef struct ThreadSpecificData { int initialized; @@ -21,7 +23,10 @@ typedef struct ThreadSpecificData { static Tcl_ThreadDataKey dataKey; #undef gai_strerror -static const char *gai_strerror(int code) { +static const char * +gai_strerror( + int code) +{ ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); if (tsdPtr->initialized) { @@ -126,7 +131,7 @@ TclSockMinimumBuffers( } len = sizeof(int); getsockopt((SOCKET)(size_t) sock, SOL_SOCKET, SO_RCVBUF, - (char *) ¤t, &len); + (char *) ¤t, &len); if (current < size) { len = sizeof(int); setsockopt((SOCKET)(size_t) sock, SOL_SOCKET, SO_RCVBUF, @@ -215,7 +220,7 @@ TclCreateSocketAddress( * We found some problems when using AI_ADDRCONFIG, e.g. on systems that * have no networking besides the loopback interface and want to resolve * localhost. See [Bugs 3385024, 3382419, 3382431]. As the advantage of - * using AI_ADDRCONFIG in situations where it works, is probably low, + * using AI_ADDRCONFIG is probably low even in situations where it works, * we'll leave it out for now. After all, it is just an optimisation. * * Missing on: OpenBSD, NetBSD. @@ -300,16 +305,20 @@ TclCreateSocketAddress( * *---------------------------------------------------------------------- */ -Tcl_Channel Tcl_OpenTcpServer(Tcl_Interp *interp, int port, - const char *host, Tcl_TcpAcceptProc *acceptProc, - ClientData callbackData) + +Tcl_Channel +Tcl_OpenTcpServer( + Tcl_Interp *interp, + int port, + const char *host, + Tcl_TcpAcceptProc *acceptProc, + ClientData callbackData) { char portbuf[TCL_INTEGER_SPACE]; TclFormatInt(portbuf, port); - return Tcl_OpenTcpServerEx(interp, portbuf, host, TCL_TCPSERVER_REUSEADDR, - acceptProc, callbackData); + acceptProc, callbackData); } /* |
