summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-11-19 13:02:05 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-11-19 13:02:05 (GMT)
commitc92c45037cf894a4599a8b1a8915575a7949dbf0 (patch)
treec1d1a1ad7d27af149a257ef0eba6b35dea1f5057 /win
parent2f86234cbc7748ccb2028dffe113d2acfad28c28 (diff)
parent292a07fb1ed3636070430bbcda1f350629eba5e2 (diff)
downloadtcl-c92c45037cf894a4599a8b1a8915575a7949dbf0.zip
tcl-c92c45037cf894a4599a8b1a8915575a7949dbf0.tar.gz
tcl-c92c45037cf894a4599a8b1a8915575a7949dbf0.tar.bz2
merge trunk
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in6
-rw-r--r--win/tcl.m42
-rw-r--r--win/tclWinConsole.c4
-rw-r--r--win/tclWinError.c2
-rw-r--r--win/tclWinPipe.c6
-rw-r--r--win/tclWinSerial.c4
-rw-r--r--win/tclWinSock.c18
7 files changed, 21 insertions, 21 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index bc1205a..616818d 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -446,13 +446,13 @@ ${TCL_LIB_FILE}: ${TCL_OBJS} ${DDE_OBJS} ${REG_OBJS}
@MAKE_LIB@ ${TCL_OBJS} ${DDE_OBJS} ${REG_OBJS}
@POST_MAKE_LIB@
-${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE}
+${DDE_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${DDE_OBJS}
@MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
-${REG_DLL_FILE}: ${REG_OBJS} ${TCL_STUB_LIB_FILE}
+${REG_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${REG_OBJS}
@MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
-${TEST_DLL_FILE}: ${TCLTEST_OBJS} ${TCL_STUB_LIB_FILE}
+${TEST_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS}
@$(RM) ${TEST_DLL_FILE} ${TEST_LIB_FILE}
@MAKE_DLL@ ${TCLTEST_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS)
diff --git a/win/tcl.m4 b/win/tcl.m4
index 52c001f..625c329 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -247,7 +247,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
#
# Results:
#
-# Subst the following vars:
+# Substitutes the following vars:
# TCL_BIN_DIR
# TCL_SRC_DIR
# TCL_LIB_FILE
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index 65e4aed..0ec22c5 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -800,7 +800,7 @@ ConsoleOutputProc(
* the channel is in non-blocking mode.
*/
- errno = EAGAIN;
+ errno = EWOULDBLOCK;
goto error;
}
@@ -1079,7 +1079,7 @@ WaitForRead(
* is in non-blocking mode.
*/
- errno = EAGAIN;
+ errno = EWOULDBLOCK;
return -1;
}
diff --git a/win/tclWinError.c b/win/tclWinError.c
index 49eeed3..4d3250d 100644
--- a/win/tclWinError.c
+++ b/win/tclWinError.c
@@ -292,7 +292,7 @@ static const unsigned char errorTable[] = {
*/
static const unsigned char wsaErrorTable[] = {
- EAGAIN, /* WSAEWOULDBLOCK */
+ EWOULDBLOCK, /* WSAEWOULDBLOCK */
EINPROGRESS, /* WSAEINPROGRESS */
EALREADY, /* WSAEALREADY */
ENOTSOCK, /* WSAENOTSOCK */
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 13caba9..77fc776 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -1884,7 +1884,7 @@ PipeClose2Proc(
SetEvent(pipePtr->stopWriter);
if (WaitForSingleObject(pipePtr->writable, 0) == WAIT_TIMEOUT) {
- return EAGAIN;
+ return EWOULDBLOCK;
}
} else {
@@ -2161,7 +2161,7 @@ PipeOutputProc(
* the channel is in non-blocking mode.
*/
- errno = EAGAIN;
+ errno = EWOULDBLOCK;
goto error;
}
@@ -2712,7 +2712,7 @@ WaitForRead(
* is in non-blocking mode.
*/
- errno = EAGAIN;
+ errno = EWOULDBLOCK;
return -1;
}
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index 75d5ffc..b9c9a9f 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -932,7 +932,7 @@ SerialInputProc(
bufSize = cStat.cbInQue;
}
} else {
- errno = *errorCode = EAGAIN;
+ errno = *errorCode = EWOULDBLOCK;
return -1;
}
} else {
@@ -1034,7 +1034,7 @@ SerialOutputProc(
* the channel is in non-blocking mode.
*/
- errno = EAGAIN;
+ errno = EWOULDBLOCK;
goto error1;
}
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index f4d5a90..11b4162 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1131,10 +1131,9 @@ CreateSocket(
int asyncConnect = 0; /* Will be 1 if async connect is in
* progress. */
unsigned short chosenport = 0;
- void *addrlist = NULL, *myaddrlist = NULL;
- struct addrinfo *addrPtr;
+ struct addrinfo *addrlist = NULL, *addrPtr;
/* Socket address to connect to. */
- struct addrinfo *myaddrPtr;
+ struct addrinfo *myaddrlist = NULL, *myaddrPtr;
/* Socket address for our side. */
const char *errorMsg = NULL;
SOCKET sock = INVALID_SOCKET;
@@ -1317,8 +1316,9 @@ CreateSocket(
if (connect(sock, addrPtr->ai_addr, addrPtr->ai_addrlen)
== SOCKET_ERROR) {
- TclWinConvertError((DWORD) WSAGetLastError());
- if (Tcl_GetErrno() != EAGAIN) {
+ DWORD error = (DWORD) WSAGetLastError();
+ if (error != WSAEWOULDBLOCK) {
+ TclWinConvertError(error);
goto looperror;
}
@@ -1359,10 +1359,10 @@ CreateSocket(
}
error:
- if (addrlist == NULL) {
+ if (addrlist != NULL) {
freeaddrinfo(addrlist);
}
- if (myaddrlist == NULL) {
+ if (myaddrlist != NULL) {
freeaddrinfo(myaddrlist);
}
@@ -1441,7 +1441,7 @@ WaitForSocketEvent(
} else if (infoPtr->readyEvents & events) {
break;
} else if (infoPtr->flags & SOCKET_ASYNC) {
- *errorCodePtr = EAGAIN;
+ *errorCodePtr = EWOULDBLOCK;
result = 0;
break;
}
@@ -1926,7 +1926,7 @@ TcpOutputProc(
if (error == WSAEWOULDBLOCK) {
infoPtr->readyEvents &= ~(FD_WRITE);
if (infoPtr->flags & SOCKET_ASYNC) {
- *errorCodePtr = EAGAIN;
+ *errorCodePtr = EWOULDBLOCK;
bytesWritten = -1;
break;
}