summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixCompat.c
diff options
context:
space:
mode:
authorvasiljevic <zv@archiware.com>2006-09-08 11:15:12 (GMT)
committervasiljevic <zv@archiware.com>2006-09-08 11:15:12 (GMT)
commit960a7f375c3d5f2f1caa761289f6f2470b9cd227 (patch)
treea4016e0af21e44d3704ec35ce062207611844550 /unix/tclUnixCompat.c
parentb98d8af767943c732d5b80448d159a9a6cbb1b09 (diff)
downloadtcl-960a7f375c3d5f2f1caa761289f6f2470b9cd227.zip
tcl-960a7f375c3d5f2f1caa761289f6f2470b9cd227.tar.gz
tcl-960a7f375c3d5f2f1caa761289f6f2470b9cd227.tar.bz2
For Darwin, assume gethostbyname() and gethostbyaddr() are MT-safe
starting with Dariwn 6 (Mac OSX 10.2) or later.
Diffstat (limited to 'unix/tclUnixCompat.c')
-rw-r--r--unix/tclUnixCompat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index c719b59..5ab7ea3 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -6,7 +6,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixCompat.c,v 1.1.2.5 2006/09/07 18:49:29 vasiljevic Exp $
+ * RCS: @(#) $Id: tclUnixCompat.c,v 1.1.2.6 2006/09/08 11:15:14 vasiljevic Exp $
*
*/
@@ -561,7 +561,7 @@ TclpGetGrGid(gid_t gid)
struct hostent *
TclpGetHostByName(const char *name)
{
-#if !defined(TCL_THREADS)
+#if !defined(TCL_THREADS) || defined(HAVE_MTSAFE_GETHOSTBYNAME)
return gethostbyname(name);
#else
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -622,7 +622,7 @@ TclpGetHostByName(const char *name)
struct hostent *
TclpGetHostByAddr(const char *addr, int length, int type)
{
-#if !defined(TCL_THREADS)
+#if !defined(TCL_THREADS) || defined(HAVE_MTSAFE_GETHOSTBYADDR)
return gethostbyaddr(addr, length, type);
#else
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);