summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2012-05-06 17:33:19 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2012-05-06 17:33:19 (GMT)
commit5744f0b649b02d5bfa4642ad87971e70624564f0 (patch)
tree02e14967bdeaf76e67719c5ee06443dc36b3ffa3 /unix/tclUnixSock.c
parent8eec230d79d6a1389b7693040bd4dfdad5f86b6f (diff)
parent8be28bf179c8bd06396c428a7982807b0d50f6be (diff)
downloadtcl-5744f0b649b02d5bfa4642ad87971e70624564f0.zip
tcl-5744f0b649b02d5bfa4642ad87971e70624564f0.tar.gz
tcl-5744f0b649b02d5bfa4642ad87971e70624564f0.tar.bz2
merge trunk
Diffstat (limited to 'unix/tclUnixSock.c')
-rw-r--r--unix/tclUnixSock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 8c94e7f..e48cc2b 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -24,6 +24,8 @@
#define SOCK_CHAN_LENGTH 4 + sizeof(void*) * 2 + 1
#define SOCK_TEMPLATE "sock%lx"
+#undef SOCKET /* Possible conflict with win32 SOCKET */
+
/*
* This is needed to comply with the strict aliasing rules of GCC, but it also
* simplifies casting between the different sockaddr types.
@@ -1030,7 +1032,8 @@ CreateClientSocket(
state->status = status;
}
if (status == 0) {
- goto out;
+ CLEAR_BITS(state->flags, TCP_ASYNC_CONNECT);
+ goto out;
}
}
}
@@ -1041,7 +1044,6 @@ out:
/*
* An asynchonous connection has finally succeeded or failed.
*/
- CLEAR_BITS(state->flags, TCP_ASYNC_CONNECT);
TcpWatchProc(state, state->filehandlers);
TclUnixSetBlockingMode(state->fds.fd, state->cachedBlocking);