Only in curl-clean: .#configure.ac.1.434
diff -ur -x CVS curl-clean/configure.ac curl/configure.ac
--- curl-clean/configure.ac	2009-11-07 11:25:42.000000000 -0800
+++ curl/configure.ac	2009-11-07 11:27:54.000000000 -0800
@@ -2241,7 +2241,7 @@
        dnl substitute HAVE_ARES for curl-config and similar
        HAVE_ARES="1"
        AC_SUBST(HAVE_ARES)
-       curl_asynch_msg="enabled (c-ares)"
+       curl_asynch_msg="yes     (c-ares)"
 
        LIBS="-lcares $LIBS"
 
@@ -2324,11 +2324,49 @@
 else
    dnl Check for threading libraries and headers.
    if test x$ac_cv_native_windows = xyes; then
-      dnl if you have a working Win32 SDK, you have threads.
-      curl_async_msg="yes (Windows threads)"
+      # if you have a working Win32 SDK, you have threads.
+      curl_asynch_msg="yes     (Windows threads)"
+
+      # the source will actually choose gethostbyname() for Windows, but we
+      # share the macro with gethostbyname_r.
+      AC_DEFINE(CURL_THREADED_RESOLVER_USE_GETHOSTBYNAME, 1,
+                [if cURL's threaded resolver should use gethostbyname/_r()])
    else
       ACX_PTHREAD
 
+      # POSIX - In general, if getaddrinfo() is thread safe, use it for IPv4 and
+      # IPv6.  In cases where it isn't, and we don't want IPv6 resolves, use
+      # gethostbyname_r if available (usually Linux only.)
+      #
+      # getaddrinfo() is thread safe on most Linuxes worth caring about, OS X
+      # Tiger or above, FreeBSD 5.2 or above, NetBSD 4.0 (unreleased) and above,
+      # and DragonflyBSD (not sure which version it was added in.) That's an
+      # incomplete support table.
+      #
+      # To be safe, be generally exclusive and disable threaded resolve when we
+      # aren't entirely sure.
+      have_threadsafe_resolver=no
+      if test x$ac_cv_func_getaddrinfo = xyes; then
+         case "$host" in
+         # Note: there was no darwin1, so simplify the expression for darwin{9,10}.
+         *-freebsd5.[[23456789]] | *-freebsd[[678]] | *-netbsd4.* | \
+         *-apple-darwin[[19]]* | *-dragonflybsd* | *-linux* )
+            have_threadsafe_resolver=yes
+            AC_DEFINE(CURL_THREADED_RESOLVER_USE_GETADDRINFO, 1,
+                      [if cURL's threaded resolver should use getaddrinfo()])
+         ;;
+         esac
+      elif test x$ipv6 = xno; then
+         # If we are IPv4-only and getaddrinfo-less, we might have a way out
+         # with gethostbyname/_r(). We share the macro with the Windows variant,
+         # where gethostbyname() is actually threadsafe.
+         if test x$ac_cv_func_gethostbyname_r = xyes; then
+            have_threadsafe_resolver=yes
+            AC_DEFINE(CURL_THREADED_RESOLVER_USE_GETHOSTBYNAME, 1,
+                      [if cURL's threaded resolver should use gethostbyname/_r()])
+         fi
+      fi
+
       # Also check for error-checking mutex availability.
       AC_MSG_CHECKING(for error-checking mutex availability)
       AC_PREPROC_IFELSE(
@@ -2340,8 +2378,10 @@
 
       AC_MSG_RESULT([$have_errorcheck_mutex])
 
-      if test x$acx_pthread_ok = xyes && test x$have_errorcheck_mutex = xyes; then
-         curl_asynch_msg="yes (pthreads)"
+      if test x$have_threadsafe_resolver = xyes && \
+         test x$acx_pthread_ok = xyes && \
+         test x$have_errorcheck_mutex = xyes; then
+         curl_asynch_msg="yes     (pthreads)"
       fi
    fi
 fi
Only in curl-clean: configure.ac.orig
Only in curl-clean/lib: .#hostthre.c.1.59
Only in curl-clean/lib: .#setup.h.1.171
Only in curl-clean/lib: setup.h.orig
Only in curl-clean/m4: acx_pthread.m4.rej
