diff options
author | vasiljevic <zv@archiware.com> | 2006-09-08 20:57:18 (GMT) |
---|---|---|
committer | vasiljevic <zv@archiware.com> | 2006-09-08 20:57:18 (GMT) |
commit | 22f04a9312703adbda93e367fc6af2064f1b14a3 (patch) | |
tree | 78f1996f41d82db81327beba3a896c4676db02c6 /unix/configure | |
parent | 4fb991a000060da5d543e5b9408e22a85e8559b0 (diff) | |
download | tcl-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')
-rwxr-xr-x | unix/configure | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/unix/configure b/unix/configure index bf0d085..a4a658c 100755 --- a/unix/configure +++ b/unix/configure @@ -10778,7 +10778,21 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 + 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. + cat >>confdefs.h <<\_ACEOF +#define HAVE_MTSAFE_GETHOSTBYNAME 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define HAVE_MTSAFE_GETHOSTBYADDR 1 +_ACEOF + + else + echo "$as_me:$LINENO: checking for gethostbyname_r" >&5 echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11091,7 +11105,7 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 + echo "$as_me:$LINENO: checking for gethostbyaddr_r" >&5 echo $ECHO_N "checking for gethostbyaddr_r... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyaddr_r+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11340,6 +11354,7 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi + fi fi #--------------------------------------------------------------------------- |