summaryrefslogtreecommitdiffstats
path: root/win/tclWinSock.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-09-08 14:53:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-09-08 14:53:35 (GMT)
commita60681c2f37e435edc66b2f75b16185a196999b1 (patch)
tree9a738046498656e92a046de8400c6a041c65fc68 /win/tclWinSock.c
parentb9b527183ac69f9f311eff0b2dce73e289985bad (diff)
parent607e3a5ba3c721c845b29c89db243882f25c5ba5 (diff)
downloadtcl-a60681c2f37e435edc66b2f75b16185a196999b1.zip
tcl-a60681c2f37e435edc66b2f75b16185a196999b1.tar.gz
tcl-a60681c2f37e435edc66b2f75b16185a196999b1.tar.bz2
Mrge 8.7. Make it work with C++, adapt win/Makefile.in to make it build on Windows with gcc
Diffstat (limited to 'win/tclWinSock.c')
-rw-r--r--win/tclWinSock.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index f85e444..f1a6a5e 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -125,9 +125,9 @@ typedef struct TcpFdList {
struct TcpState {
Tcl_Channel channel; /* Channel associated with this socket. */
- struct TcpFdList *sockets; /* Windows SOCKET handle. */
int flags; /* Bit field comprised of the flags described
* below. */
+ struct TcpFdList *sockets; /* Windows SOCKET handle. */
int watchEvents; /* OR'ed combination of FD_READ, FD_WRITE,
* FD_CLOSE, FD_ACCEPT and FD_CONNECT that
* indicate which events are interesting. */
@@ -165,8 +165,6 @@ struct TcpState {
* Access must be protected by semaphore */
struct TcpState *nextPtr; /* The next socket on the per-thread socket
* list. */
- int testFlags; /* bit field for tests. Is set by testsocket
- * test procedure */
};
/*
@@ -186,12 +184,7 @@ struct TcpState {
* still pending */
#define TCP_ASYNC_FAILED (1<<5) /* An async connect finally failed */
-/*
- * These bits may be ORed together into the "testFlags" field of a TcpState
- * structure.
- */
-
-#define TCP_ASYNC_TEST_MODE (1<<0) /* Async testing activated. Do not
+#define TCP_ASYNC_TEST_MODE (1<<8) /* Async testing activated. Do not
* automatically continue connection
* process */
@@ -630,7 +623,7 @@ WaitForConnect(
* - Call by the event queue (errorCodePtr == NULL)
*/
- if (GOT_BITS(statePtr->testFlags, TCP_ASYNC_TEST_MODE)
+ if (GOT_BITS(statePtr->flags, TCP_ASYNC_TEST_MODE)
&& errorCodePtr != NULL
&& GOT_BITS(statePtr->flags, TCP_NONBLOCKING)) {
*errorCodePtr = EWOULDBLOCK;
@@ -1323,7 +1316,7 @@ TcpGetOptionProc(
* below.
*/
- if (!GOT_BITS(statePtr->testFlags, TCP_ASYNC_TEST_MODE)) {
+ if (!GOT_BITS(statePtr->flags, TCP_ASYNC_TEST_MODE)) {
WaitForConnect(statePtr, NULL);
}