summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
authorvasiljevic <zv@archiware.com>2006-09-08 20:57:18 (GMT)
committervasiljevic <zv@archiware.com>2006-09-08 20:57:18 (GMT)
commit22f04a9312703adbda93e367fc6af2064f1b14a3 (patch)
tree78f1996f41d82db81327beba3a896c4676db02c6 /unix/configure.in
parent4fb991a000060da5d543e5b9408e22a85e8559b0 (diff)
downloadtcl-22f04a9312703adbda93e367fc6af2064f1b14a3.zip
tcl-22f04a9312703adbda93e367fc6af2064f1b14a3.tar.gz
tcl-22f04a9312703adbda93e367fc6af2064f1b14a3.tar.bz2
Added special handling for Darwin where gethostbyname/addr are actually
MT-safe per-se.
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in15
1 files changed, 12 insertions, 3 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 8e248e9..16cf959 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.145 2006/09/06 13:23:37 vasiljevic Exp $
+# RCS: @(#) $Id: configure.in,v 1.146 2006/09/08 20:57:19 vasiljevic Exp $
AC_INIT([tcl],[8.5])
AC_PREREQ(2.59)
@@ -171,8 +171,17 @@ if test "${TCL_THREADS}" = 1; then
SC_TCL_GETPWNAM_R
SC_TCL_GETGRGID_R
SC_TCL_GETGRNAM_R
- SC_TCL_GETHOSTBYNAME_R
- SC_TCL_GETHOSTBYADDR_R
+ if test "`uname -s`" = "Darwin" && \
+ test "`uname -r | awk -F. '{print [$]1}'`" -gt 5; then
+ # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX
+ # are actually MT-safe as they always return pointers
+ # from the TSD instead of the static storage.
+ AC_DEFINE(HAVE_MTSAFE_GETHOSTBYNAME)
+ AC_DEFINE(HAVE_MTSAFE_GETHOSTBYADDR)
+ else
+ SC_TCL_GETHOSTBYNAME_R
+ SC_TCL_GETHOSTBYADDR_R
+ fi
fi
#---------------------------------------------------------------------------