Subject: make sure that extensions which might still use TclWinNToHS, now use ntohs directly.

From: "jan.nijtmans" <[email-masked]>
Date: Fri, 24 Aug 2012 06:29:44 +0000

---
 generic/tclIntPlatDecls.h | 5 ++++-
 generic/tclStubInit.c     | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 34a23a4..1e68c9c 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -845,7 +845,10 @@ extern TclIntPlatStubs *tclIntPlatStubsPtr;
 #undef TclpLocaltime_unix
 #undef TclpGmtime_unix
 
-#if !defined(__WIN32__) && !defined(__CYGWIN__)
+#if defined(__WIN32__) || defined(__CYGWIN__)
+#   undef TclWinNToHS
+#   define TclWinNToHS ntohs
+#else
 #   undef TclpGetPid
 #   define TclpGetPid(pid) ((unsigned long) (pid))
 #endif
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 6a3207b..d06e174 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -76,6 +76,7 @@ MODULE_SCOPE TclStubs tclStubs;
 MODULE_SCOPE TclTomMathStubs tclTomMathStubs;
 
 #if defined(_WIN32) || defined(__CYGWIN__)
+#undef TclWinNToHS
 unsigned short TclWinNToHS(unsigned short ns) {
 	return ntohs(ns);
 }
-- 
cgit v0.12