Subject: small wrapper for TclWinNToHs, for change in calling convention

From: "jan.nijtmans" <[email-masked]>
Date: Thu, 23 Aug 2012 20:06:18 +0000

---
 generic/tclStubInit.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 3be6b45..6a3207b 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -74,7 +74,12 @@ MODULE_SCOPE TclIntPlatStubs tclIntPlatStubs;
 MODULE_SCOPE TclPlatStubs tclPlatStubs;
 MODULE_SCOPE TclStubs tclStubs;
 MODULE_SCOPE TclTomMathStubs tclTomMathStubs;
-#define TclWinNToHS ntohs
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+unsigned short TclWinNToHS(unsigned short ns) {
+	return ntohs(ns);
+}
+#endif
 
 #ifdef __WIN32__
 #   define TclUnixWaitForFile 0
-- 
cgit v0.12