]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
getaddrinfo is fully thread safe on solaris versions which
authorYang Tse <yangsita@gmail.com>
Sun, 15 Nov 2009 13:43:15 +0000 (13:43 +0000)
committerYang Tse <yangsita@gmail.com>
Sun, 15 Nov 2009 13:43:15 +0000 (13:43 +0000)
implement the function even when h_errno is not a macro.

The h_errno macro test now only done on systems for which there
is no hard coded knowledge about getaddrinfo's thread safeness.

ares/m4/cares-functions.m4
m4/curl-functions.m4

index 8d174d8aa5c6ce6fe79c528772e6434275d05c6c..72d878449180deac00dc7410750270fd38e77688 100644 (file)
@@ -1055,14 +1055,20 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
         dnl All other bsd's
         tst_tsafe_getaddrinfo="no"
         ;;
+      solaris2*)
+        dnl solaris which have it
+        tst_tsafe_getaddrinfo="yes"
+        ;;
     esac
-    CURL_CHECK_DEF_CC([h_errno], [
-      $curl_includes_ws2tcpip
-      $curl_includes_sys_socket
-      $curl_includes_netdb
-      ], [silent])
-    if test "$curl_cv_have_def_h_errno" = "no"; then
-      tst_tsafe_getaddrinfo="no"
+    if test "$tst_tsafe_getaddrinfo" = "unknown"; then
+      CURL_CHECK_DEF_CC([h_errno], [
+        $curl_includes_ws2tcpip
+        $curl_includes_sys_socket
+        $curl_includes_netdb
+        ], [silent])
+      if test "$curl_cv_have_def_h_errno" = "no"; then
+        tst_tsafe_getaddrinfo="no"
+      fi
     fi
     if test "$tst_tsafe_getaddrinfo" = "unknown"; then
       tst_tsafe_getaddrinfo="yes"
index df3a5850c0b5765892a84bdc4e2fd636b33bb05c..48d32b10a2f39929e84ca2b76f37caecdfa1041a 100644 (file)
@@ -1679,14 +1679,20 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
         dnl All other bsd's
         tst_tsafe_getaddrinfo="no"
         ;;
+      solaris2*)
+        dnl solaris which have it
+        tst_tsafe_getaddrinfo="yes"
+        ;;
     esac
-    CURL_CHECK_DEF_CC([h_errno], [
-      $curl_includes_ws2tcpip
-      $curl_includes_sys_socket
-      $curl_includes_netdb
-      ], [silent])
-    if test "$curl_cv_have_def_h_errno" = "no"; then
-      tst_tsafe_getaddrinfo="no"
+    if test "$tst_tsafe_getaddrinfo" = "unknown"; then
+      CURL_CHECK_DEF_CC([h_errno], [
+        $curl_includes_ws2tcpip
+        $curl_includes_sys_socket
+        $curl_includes_netdb
+        ], [silent])
+      if test "$curl_cv_have_def_h_errno" = "no"; then
+        tst_tsafe_getaddrinfo="no"
+      fi
     fi
     if test "$tst_tsafe_getaddrinfo" = "unknown"; then
       tst_tsafe_getaddrinfo="yes"