From 8d8c38c7c7c041d78aa424c6c75b9e56cdd29192 Mon Sep 17 00:00:00 2001
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
Date: Fri, 21 Jun 2013 11:57:59 +0000
Subject: Don't use TclpInetNtoa any more, use inet_ntoa in stead. Since IP6
 support it's even not necessary any more (except for fake-rfc2553, but
 mutexes are used here already) , but it's in the internal stub table so we
 cannot remove it until 9.0

---
 generic/tclIntPlatDecls.h | 2 ++
 generic/tclStubInit.c     | 1 +
 unix/tclUnixPort.h        | 2 --
 unix/tclUnixThrd.c        | 1 +
 win/tclWinSock.c          | 1 +
 5 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index dcf1753..3181d4e 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -545,6 +545,8 @@ extern const TclIntPlatStubs *tclIntPlatStubsPtr;
 #undef TclpGmtime_unix
 #undef TclWinConvertWSAError
 #define TclWinConvertWSAError TclWinConvertError
+#undef TclpInetNtoa
+#define TclpInetNtoa inet_ntoa
 
 #if defined(__WIN32__) || defined(__CYGWIN__)
 #   undef TclWinNToHS
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 1b04542..782bbdf 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -43,6 +43,7 @@
 #undef TclSockMinimumBuffers
 #define TclBackgroundException Tcl_BackgroundException
 #undef Tcl_SetIntObj
+#undef TclpInetNtoa
 
 /* See bug 510001: TclSockMinimumBuffers needs plat imp */
 #ifdef _WIN64
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index fde1909..2ade1c0 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -700,8 +700,6 @@ typedef int socklen_t;
 
 #ifdef TCL_THREADS
 #   include <pthread.h>
-#   undef inet_ntoa
-#   define inet_ntoa(x)	TclpInetNtoa(x)
 #endif /* TCL_THREADS */
 
 /* FIXME - Hyper-enormous platform assumption! */
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 789dbb6..f469341 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -659,6 +659,7 @@ TclpReaddir(
     return TclOSreaddir(dir);
 }
 
+#undef TclpInetNtoa
 char *
 TclpInetNtoa(
     struct in_addr addr)
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 1a74354..4ced0e7 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -2735,6 +2735,7 @@ TclWinSetSockOpt(
     return setsockopt(s, level, optname, optval, optlen);
 }
 
+#undef TclpInetNtoa
 char *
 TclpInetNtoa(
     struct in_addr addr)
-- 
cgit v0.12