summaryrefslogtreecommitdiffstats
path: root/generic/tclIOSock.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-06-22 12:25:35 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-06-22 12:25:35 (GMT)
commit69201f94bdcef502012a231e2100bceef5062f90 (patch)
tree318ce059db03075568b505a7caa2624fce436e13 /generic/tclIOSock.c
parent6aa0cc7188b6df1dac97b03bc0b9240aa780799b (diff)
parentf57dacd4955b9dd474cfd9d4e4d55cac22990f6c (diff)
downloadtcl-69201f94bdcef502012a231e2100bceef5062f90.zip
tcl-69201f94bdcef502012a231e2100bceef5062f90.tar.gz
tcl-69201f94bdcef502012a231e2100bceef5062f90.tar.bz2
merge trunktip_463
Diffstat (limited to 'generic/tclIOSock.c')
-rw-r--r--generic/tclIOSock.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c
index 8ad268a..6abfa60 100644
--- a/generic/tclIOSock.c
+++ b/generic/tclIOSock.c
@@ -12,16 +12,21 @@
#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 {
+typedef struct {
int initialized;
Tcl_DString errorMsg; /* UTF-8 encoded error-message */
} 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 *) &current, &len);
+ (char *) &current, &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);
}
/*