summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormax <max@tclers.tk>2013-11-18 13:32:30 (GMT)
committermax <max@tclers.tk>2013-11-18 13:32:30 (GMT)
commit9b104b7167d18325a28a7e1c3891ce8513249e23 (patch)
treec561fb12851610556220bebcb1839b9d616d4e41
parent643e5bc24ed7dd6a21ca1a562693d0d9ce4f2651 (diff)
downloadtcl-9b104b7167d18325a28a7e1c3891ce8513249e23.zip
tcl-9b104b7167d18325a28a7e1c3891ce8513249e23.tar.gz
tcl-9b104b7167d18325a28a7e1c3891ce8513249e23.tar.bz2
Revert [3c0b0bbda6]. If this really is a problem, it needs to get fixed by other means than covering behind void pointers.
-rw-r--r--generic/tclIOSock.c4
-rw-r--r--generic/tclInt.h5
-rw-r--r--unix/tclUnixSock.c5
-rw-r--r--win/tclWinSock.c5
4 files changed, 9 insertions, 10 deletions
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 feea6dd..5c8dbfd 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/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 7ef28d8..49a6460 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -1140,7 +1140,7 @@ Tcl_OpenTcpClient(
{
TcpState *state;
const char *errorMsg = NULL;
- void *addrlist = NULL, *myaddrlist = NULL;
+ struct addrinfo *addrlist = NULL, *myaddrlist = NULL;
char channelName[SOCK_CHAN_LENGTH];
/*
@@ -1285,8 +1285,7 @@ Tcl_OpenTcpServer(
ClientData acceptProcData) /* Data for the callback. */
{
int status = 0, sock = -1, reuseaddr = 1, chosenport = 0;
- void *addrlist = NULL;
- struct addrinfo *addrPtr; /* socket address */
+ struct addrinfo *addrlist = NULL, *addrPtr; /* socket address */
TcpState *statePtr = NULL;
char channelName[SOCK_CHAN_LENGTH];
const char *errorMsg = NULL;
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 5ac8f47..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;