summaryrefslogtreecommitdiffstats
path: root/generic
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 /generic
parent2f86234cbc7748ccb2028dffe113d2acfad28c28 (diff)
parent292a07fb1ed3636070430bbcda1f350629eba5e2 (diff)
downloadtcl-c92c45037cf894a4599a8b1a8915575a7949dbf0.zip
tcl-c92c45037cf894a4599a8b1a8915575a7949dbf0.tar.gz
tcl-c92c45037cf894a4599a8b1a8915575a7949dbf0.tar.bz2
merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIOGT.c5
-rw-r--r--generic/tclIOSock.c4
-rw-r--r--generic/tclInt.h5
-rw-r--r--generic/tclNotify.c6
4 files changed, 9 insertions, 11 deletions
diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c
index bfe6a10..825f408 100644
--- a/generic/tclIOGT.c
+++ b/generic/tclIOGT.c
@@ -661,12 +661,13 @@ TransformInputProc(
* had some data before we report that instead of the request to
* re-try.
*/
+ int error = Tcl_GetErrno();
- if ((Tcl_GetErrno() == EAGAIN) && (gotBytes > 0)) {
+ if ((error == EAGAIN) && (gotBytes > 0)) {
return gotBytes;
}
- *errorCodePtr = Tcl_GetErrno();
+ *errorCodePtr = error;
return -1;
} else if (read == 0) {
/*
diff --git a/generic/tclIOSock.c b/generic/tclIOSock.c
index 7d6c462..694501f 100644
--- a/generic/tclIOSock.c
+++ b/generic/tclIOSock.c
@@ -139,7 +139,7 @@ int
TclCreateSocketAddress(
Tcl_Interp *interp, /* Interpreter for querying
* the desired socket family */
- void **addrlist, /* Socket address list */
+ struct addrinfo **addrlist, /* Socket address list */
const char *host, /* Host. NULL implies INADDR_ANY */
int port, /* Port number */
int willBind, /* Is this an address to bind() to or
@@ -213,7 +213,7 @@ TclCreateSocketAddress(
hints.ai_flags |= AI_PASSIVE;
}
- result = getaddrinfo(native, portstring, &hints, (struct addrinfo **) addrlist);
+ result = getaddrinfo(native, portstring, &hints, addrlist);
if (host != NULL) {
Tcl_DStringFree(&ds);
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 6806302..aac94ca 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3001,8 +3001,9 @@ MODULE_SCOPE void TclpFinalizeMutex(Tcl_Mutex *mutexPtr);
MODULE_SCOPE void TclpFinalizePipes(void);
MODULE_SCOPE void TclpFinalizeSockets(void);
MODULE_SCOPE int TclCreateSocketAddress(Tcl_Interp *interp,
- void **addrlist, const char *host, int port,
- int willBind, const char **errorMsgPtr);
+ struct addrinfo **addrlist,
+ const char *host, int port, int willBind,
+ const char **errorMsgPtr);
MODULE_SCOPE int TclpThreadCreate(Tcl_ThreadId *idPtr,
Tcl_ThreadCreateProc *proc, ClientData clientData,
int stackSize, int flags);
diff --git a/generic/tclNotify.c b/generic/tclNotify.c
index a6523fc..e76bca8 100644
--- a/generic/tclNotify.c
+++ b/generic/tclNotify.c
@@ -813,11 +813,7 @@ Tcl_SetMaxBlockTime(
*/
if (!tsdPtr->inTraversal) {
- if (tsdPtr->blockTimeSet) {
- Tcl_SetTimer(&tsdPtr->blockTime);
- } else {
- Tcl_SetTimer(NULL);
- }
+ Tcl_SetTimer(&tsdPtr->blockTime);
}
}