Am 06.10.2005 um 20:54 schrieb Stephen Deasey:
Around line 195 of configure.in there's this test:
has_threadsafe_dns=no
AC_CHECK_LIB(socket, getaddrinfo)
AC_CHECK_LIB(socket, getnameinfo)
AC_CHECK_FUNCS(getaddrinfo getnameinfo)
if test "${ac_cv_func_getaddrinfo}" = "yes" \
-a "${ac_cv_func_getnameinfo}" = "yes" ; then
has_threadsafe_dns=yes
fi
if test "${has_threadsafe_dns}" != "yes" ; then
AC_HAVE_GETHOSTBYNAME_R
AC_HAVE_GETHOSTBYADDR_R
if test "${ac_cv_func_gethostbyname_r}" = "yes" \
-a "${ac_cv_func_gethostbyaddr_r}" = "yes" ; then
has_threadsafe_dns=yes
fi
fi
if test "${has_threadsafe_dns}" != "yes" ; then
AC_MSG_WARN([dns queries will use non-threadsafe calls which could
result in server instability])
fi
Maybe you could check if $system == Darwin after the first check and
set has_threadsafe_dns = no.
At least this way all the checking is confined to the configure script
and not scattered throughout the source.
Even better would be to test for the brokenness rather than the
platform. Not sure what what the bug is or how easy it would be to
check for. Then when Apple fix this we start using getnameinfo again
automatically.
OK. I found the problem with getnameinfo and also found out that none
of the apropriate calls on Darwin are thread safe... I will have to
check out how to resolve this...
Thanks for the hint. I do not understand how I did not see that
one... I grep'ed all the sources...
Zoran