Subject: Remove TclWinNToHS, it is not used anywhere any more.

From: "jan.nijtmans" <[email-masked]>
Date: Thu, 10 Jan 2013 11:45:08 +0000

---
 generic/tclInt.decls      |  7 ++++---
 generic/tclIntPlatDecls.h | 13 ++++---------
 generic/tclStubInit.c     | 10 +---------
 3 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/generic/tclInt.decls b/generic/tclInt.decls
index 8c46e55..d23d61a 100644
--- a/generic/tclInt.decls
+++ b/generic/tclInt.decls
@@ -1046,9 +1046,10 @@ declare 5 win {
 #  declare 5 win {
 #      HINSTANCE TclWinLoadLibrary(char *name)
 #  }
-declare 6 win {
-    unsigned short TclWinNToHS(unsigned short ns)
-}
+# Removed in 8.1:
+#declare 6 win {
+#    unsigned short TclWinNToHS(unsigned short ns)
+#}
 declare 7 win {
     int TclWinSetSockOpt(SOCKET s, int level, int optname,
 	    const char *optval, int optlen)
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index f7eb442..010fe88 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -101,8 +101,7 @@ TCLAPI int		TclWinGetSockOpt(SOCKET s, int level, int optname,
 TCLAPI HINSTANCE	TclWinGetTclInstance(void);
 /* 5 */
 TCLAPI int		TclUnixWaitForFile(int fd, int mask, int timeout);
-/* 6 */
-TCLAPI unsigned short	TclWinNToHS(unsigned short ns);
+/* Slot 6 is reserved */
 /* 7 */
 TCLAPI int		TclWinSetSockOpt(SOCKET s, int level, int optname,
 				const char *optval, int optlen);
@@ -278,7 +277,7 @@ typedef struct TclIntPlatStubs {
     int (*tclWinGetSockOpt) (SOCKET s, int level, int optname, char *optval, int *optlen); /* 3 */
     HINSTANCE (*tclWinGetTclInstance) (void); /* 4 */
     int (*tclUnixWaitForFile) (int fd, int mask, int timeout); /* 5 */
-    unsigned short (*tclWinNToHS) (unsigned short ns); /* 6 */
+    void (*reserved6)(void);
     int (*tclWinSetSockOpt) (SOCKET s, int level, int optname, const char *optval, int optlen); /* 7 */
     int (*tclpGetPid) (Tcl_Pid pid); /* 8 */
     int (*tclWinGetPlatformId) (void); /* 9 */
@@ -412,8 +411,7 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
 	(tclIntPlatStubsPtr->tclWinGetTclInstance) /* 4 */
 #define TclUnixWaitForFile \
 	(tclIntPlatStubsPtr->tclUnixWaitForFile) /* 5 */
-#define TclWinNToHS \
-	(tclIntPlatStubsPtr->tclWinNToHS) /* 6 */
+/* Slot 6 is reserved */
 #define TclWinSetSockOpt \
 	(tclIntPlatStubsPtr->tclWinSetSockOpt) /* 7 */
 #define TclpGetPid \
@@ -518,10 +516,7 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
 
 /* !END!: Do not edit above this line. */
 
-#if defined(__WIN32__) || defined(__CYGWIN__)
-#   undef TclWinNToHS
-#   define TclWinNToHS ntohs
-#else
+#if !defined(__WIN32__) && !defined(__CYGWIN__)
 #   undef TclpGetPid
 #   define TclpGetPid(pid) ((unsigned long) (pid))
 #endif
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 9a5dee2..66dadb8 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -66,14 +66,6 @@ static int TclPkgProvide(
 	return TCL_ERROR;
 }
 
-#if defined(_WIN32) || defined(__CYGWIN__)
-#undef TclWinNToHS
-#define TclWinNToHS winNToHS
-static unsigned short TclWinNToHS(unsigned short ns) {
-	return ntohs(ns);
-}
-#endif
-
 #ifdef __WIN32__
 #   define TclUnixWaitForFile 0
 #   define TclUnixCopyFile 0
@@ -494,7 +486,7 @@ static const TclIntPlatStubs tclIntPlatStubs = {
     TclWinGetSockOpt, /* 3 */
     TclWinGetTclInstance, /* 4 */
     TclUnixWaitForFile, /* 5 */
-    TclWinNToHS, /* 6 */
+    0, /* 6 */
     TclWinSetSockOpt, /* 7 */
     TclpGetPid, /* 8 */
     TclWinGetPlatformId, /* 9 */
-- 
cgit v0.12