summaryrefslogtreecommitdiffstats
path: root/win/tclWinSock.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-08-20 08:59:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-08-20 08:59:36 (GMT)
commit45f8aafc9099cb3ee0ae65d68f59d57ba5cec4d9 (patch)
tree807dbba5af2220d8b1e8baf1533e52017acef1cc /win/tclWinSock.c
parent53c3622234fd4f6f0942c48e474c2ca166c3c6bd (diff)
downloadtcl-45f8aafc9099cb3ee0ae65d68f59d57ba5cec4d9.zip
tcl-45f8aafc9099cb3ee0ae65d68f59d57ba5cec4d9.tar.gz
tcl-45f8aafc9099cb3ee0ae65d68f59d57ba5cec4d9.tar.bz2
Remove wrapper macro for ntohs(): unnecessary, because it doesn't require an initialized winsock_2 library
Diffstat (limited to 'win/tclWinSock.c')
-rw-r--r--win/tclWinSock.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 63f166d..8f2028d 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -65,7 +65,6 @@
#undef getservbyname
#undef getsockopt
-#undef ntohs
#undef setsockopt
/*
@@ -131,7 +130,7 @@ typedef struct SocketInfo {
* socket event occurs.
*/
-typedef struct SocketEvent {
+typedef struct {
Tcl_Event header; /* Information that is standard for all
* events. */
SOCKET socket; /* Socket descriptor that is ready. Used to
@@ -159,7 +158,7 @@ typedef struct SocketEvent {
#define SOCKET_PENDING (1<<3) /* A message has been sent for this
* socket */
-typedef struct ThreadSpecificData {
+typedef struct {
HWND hwnd; /* Handle to window for socket messages. */
HANDLE socketThread; /* Thread handling the window */
Tcl_ThreadId threadId; /* Parent thread. */
@@ -2508,23 +2507,6 @@ TclWinSetSockOpt(SOCKET s, int level, int optname, const char *optval,
return setsockopt(s, level, optname, optval, optlen);
}
-unsigned short
-TclWinNToHS(unsigned short netshort)
-{
- /*
- * Check that WinSock is initialized; do not call it if not, to
- * prevent system crashes. This can happen at exit time if the exit
- * handler for WinSock ran before other exit handlers that want to
- * use sockets.
- */
-
- if (!SocketsEnabled()) {
- return (unsigned short) -1;
- }
-
- return ntohs(netshort);
-}
-
char *
TclpInetNtoa(struct in_addr addr)
{