]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r
authorGergely Nagy <ngg@tresorit.com>
Fri, 18 Jun 2021 08:39:35 +0000 (10:39 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 18 Jun 2021 11:52:21 +0000 (13:52 +0200)
Closes #7276

16 files changed:
CMake/CurlTests.c
CMake/Platforms/WindowsCache.cmake
CMakeLists.txt
configure.ac
lib/Makefile.netware
lib/config-amigaos.h
lib/config-os400.h
lib/config-plan9.h
lib/config-riscos.h
lib/config-tpf.h
lib/config-vxworks.h
lib/config-win32.h
lib/config-win32ce.h
lib/curl_config.h.cmake
m4/curl-functions.m4
m4/curl-reentrant.m4

index 9c278ec50e762d7b3146e626a0f32cb64a4973b4..07dca5ec104caaa25c0557043075922afdca1389 100644 (file)
@@ -71,21 +71,15 @@ main ()
 }
 #endif
 
-/* tests for gethostbyaddr_r or gethostbyname_r */
-#if defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
-    defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
-    defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
-    defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
+/* tests for gethostbyname_r */
+#if defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT) || \
     defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
     defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
 #   define _REENTRANT
     /* no idea whether _REENTRANT is always set, just invent a new flag */
 #   define TEST_GETHOSTBYFOO_REENTRANT
 #endif
-#if defined(HAVE_GETHOSTBYADDR_R_5) || \
-    defined(HAVE_GETHOSTBYADDR_R_7) || \
-    defined(HAVE_GETHOSTBYADDR_R_8) || \
-    defined(HAVE_GETHOSTBYNAME_R_3) || \
+#if defined(HAVE_GETHOSTBYNAME_R_3) || \
     defined(HAVE_GETHOSTBYNAME_R_5) || \
     defined(HAVE_GETHOSTBYNAME_R_6) || \
     defined(TEST_GETHOSTBYFOO_REENTRANT)
@@ -98,18 +92,10 @@ int main(void)
   int type = 0;
   struct hostent h;
   int rc = 0;
-#if defined(HAVE_GETHOSTBYADDR_R_5) || \
-    defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT) || \
-    \
-    defined(HAVE_GETHOSTBYNAME_R_3) || \
+#if defined(HAVE_GETHOSTBYNAME_R_3) || \
     defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
   struct hostent_data hdata;
-#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
-      defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT) || \
-      defined(HAVE_GETHOSTBYADDR_R_8) || \
-      defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT) || \
-      \
-      defined(HAVE_GETHOSTBYNAME_R_5) || \
+#elif defined(HAVE_GETHOSTBYNAME_R_5) || \
       defined(HAVE_GETHOSTBYNAME_R_5_REENTRANT) || \
       defined(HAVE_GETHOSTBYNAME_R_6) || \
       defined(HAVE_GETHOSTBYNAME_R_6_REENTRANT)
@@ -118,24 +104,6 @@ int main(void)
   struct hostent *hp;
 #endif
 
-#ifndef gethostbyaddr_r
-  (void)gethostbyaddr_r;
-#endif
-
-#if   defined(HAVE_GETHOSTBYADDR_R_5) || \
-      defined(HAVE_GETHOSTBYADDR_R_5_REENTRANT)
-  rc = gethostbyaddr_r(address, length, type, &h, &hdata);
-  (void)rc;
-#elif defined(HAVE_GETHOSTBYADDR_R_7) || \
-      defined(HAVE_GETHOSTBYADDR_R_7_REENTRANT)
-  hp = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &h_errnop);
-  (void)hp;
-#elif defined(HAVE_GETHOSTBYADDR_R_8) || \
-      defined(HAVE_GETHOSTBYADDR_R_8_REENTRANT)
-  rc = gethostbyaddr_r(address, length, type, &h, buffer, 8192, &hp, &h_errnop);
-  (void)rc;
-#endif
-
 #if   defined(HAVE_GETHOSTBYNAME_R_3) || \
       defined(HAVE_GETHOSTBYNAME_R_3_REENTRANT)
   rc = gethostbyname_r(address, &h, &hdata);
index 2f96dbca330ca919afd859173c43ebc12ed01667..fb803f8a6a00cb9142841089101c5fe06f350bc9 100644 (file)
@@ -83,7 +83,6 @@ if(NOT UNIX)
     set(HAVE_STRCASECMP 0)
     set(HAVE_STRICMP 1)
     set(HAVE_STRCMPI 1)
-    set(HAVE_GETHOSTBYADDR 1)
     set(HAVE_GETTIMEOFDAY 0)
     set(HAVE_INET_ADDR 1)
     set(HAVE_CLOSESOCKET 1)
@@ -99,17 +98,10 @@ if(NOT UNIX)
     set(HAVE_RAND_STATUS 0)
     set(HAVE_GMTIME_R 0)
     set(HAVE_LOCALTIME_R 0)
-    set(HAVE_GETHOSTBYADDR_R 0)
     set(HAVE_GETHOSTBYNAME_R 0)
     set(HAVE_SIGNAL_FUNC 1)
     set(HAVE_SIGNAL_MACRO 0)
 
-    set(HAVE_GETHOSTBYADDR_R_5 0)
-    set(HAVE_GETHOSTBYADDR_R_5_REENTRANT 0)
-    set(HAVE_GETHOSTBYADDR_R_7 0)
-    set(HAVE_GETHOSTBYADDR_R_7_REENTRANT 0)
-    set(HAVE_GETHOSTBYADDR_R_8 0)
-    set(HAVE_GETHOSTBYADDR_R_8_REENTRANT 0)
     set(HAVE_GETHOSTBYNAME_R_3 0)
     set(HAVE_GETHOSTBYNAME_R_3_REENTRANT 0)
     set(HAVE_GETHOSTBYNAME_R_5 0)
index 0fb196a13007d237b0f5cd0e52f53426efe1da65..cf4f3c5799297d662bfbbe929dc684f617c13fe1 100644 (file)
@@ -1015,8 +1015,6 @@ endif()
 check_symbol_exists(getppid       "${CURL_INCLUDES}" HAVE_GETPPID)
 check_symbol_exists(utimes        "${CURL_INCLUDES}" HAVE_UTIMES)
 
-check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR)
-check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R)
 check_symbol_exists(gettimeofday  "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY)
 check_symbol_exists(inet_addr     "${CURL_INCLUDES}" HAVE_INET_ADDR)
 check_symbol_exists(closesocket   "${CURL_INCLUDES}" HAVE_CLOSESOCKET)
@@ -1111,12 +1109,6 @@ foreach(CURL_TEST
     HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
     TIME_WITH_SYS_TIME
     HAVE_O_NONBLOCK
-    HAVE_GETHOSTBYADDR_R_5
-    HAVE_GETHOSTBYADDR_R_7
-    HAVE_GETHOSTBYADDR_R_8
-    HAVE_GETHOSTBYADDR_R_5_REENTRANT
-    HAVE_GETHOSTBYADDR_R_7_REENTRANT
-    HAVE_GETHOSTBYADDR_R_8_REENTRANT
     HAVE_GETHOSTBYNAME_R_3
     HAVE_GETHOSTBYNAME_R_5
     HAVE_GETHOSTBYNAME_R_6
@@ -1157,9 +1149,6 @@ endforeach()
 
 # Check for reentrant
 foreach(CURL_TEST
-    HAVE_GETHOSTBYADDR_R_5
-    HAVE_GETHOSTBYADDR_R_7
-    HAVE_GETHOSTBYADDR_R_8
     HAVE_GETHOSTBYNAME_R_3
     HAVE_GETHOSTBYNAME_R_5
     HAVE_GETHOSTBYNAME_R_6)
@@ -1172,9 +1161,6 @@ endforeach()
 
 if(NEED_REENTRANT)
   foreach(CURL_TEST
-      HAVE_GETHOSTBYADDR_R_5
-      HAVE_GETHOSTBYADDR_R_7
-      HAVE_GETHOSTBYADDR_R_8
       HAVE_GETHOSTBYNAME_R_3
       HAVE_GETHOSTBYNAME_R_5
       HAVE_GETHOSTBYNAME_R_6)
index de957855215b8914aab4c878954088db68fc07a3..9dffa6b2f2dd66345465a06b3517b2f8f2265992 100644 (file)
@@ -3222,8 +3222,6 @@ CURL_CHECK_FUNC_FREEADDRINFO
 CURL_CHECK_FUNC_FSETXATTR
 CURL_CHECK_FUNC_FTRUNCATE
 CURL_CHECK_FUNC_GETADDRINFO
-CURL_CHECK_FUNC_GETHOSTBYADDR
-CURL_CHECK_FUNC_GETHOSTBYADDR_R
 CURL_CHECK_FUNC_GETHOSTBYNAME
 CURL_CHECK_FUNC_GETHOSTBYNAME_R
 CURL_CHECK_FUNC_GETHOSTNAME
index a967b70aa07eb696276ab7b3506271fccf7a4d5c..cf7904aa72ade2f5d2b51d57fc2934392e3020d6 100644 (file)
@@ -561,7 +561,6 @@ endif
        @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
        @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
        @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
        @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
index fc30cb8636466d3b1bffb360a5889a04be68fb70..0bbf4c41df5da6092bbfde421bd31f5b7983886f 100644 (file)
@@ -31,7 +31,6 @@
 #define HAVE_ARPA_INET_H 1
 #define HAVE_CLOSESOCKET_CAMEL 1
 #define HAVE_ERRNO_H 1
-#define HAVE_GETHOSTBYADDR 1
 #define HAVE_INET_ADDR 1
 #define HAVE_INTTYPES_H 1
 #define HAVE_IOCTLSOCKET_CAMEL 1
index 3f5d9c5b390e3d0cb5a16956de398e5184aee26f..cff9c3e6243100bb6c8af5ada8c0f90efa42c007 100644 (file)
 /* Define cpu-machine-OS */
 #define OS "OS/400"
 
-/* Define if you have the gethostbyaddr_r() function with 5 arguments */
-#define HAVE_GETHOSTBYADDR_R_5
-
-/* Define if you have the gethostbyaddr_r() function with 7 arguments */
-#undef HAVE_GETHOSTBYADDR_R_7
-
-/* Define if you have the gethostbyaddr_r() function with 8 arguments */
-#undef HAVE_GETHOSTBYADDR_R_8
-
 /* OS400 supports a 3-argument ASCII version of gethostbyaddr_r(), but its
  *  prototype is incompatible with the "standard" one (1st argument is not
  *  const). However, getaddrinfo() is supported (ASCII version defined as
 /* Define if you have the `geteuid' function. */
 #define HAVE_GETEUID
 
-/* Define if you have the `gethostbyaddr' function. */
-#define HAVE_GETHOSTBYADDR
-
-/* Define if you have the `gethostbyaddr_r' function. */
-#define HAVE_GETHOSTBYADDR_R
-
 /* Define if you have the `gethostname' function. */
 #define HAVE_GETHOSTNAME
 
index 54d081f5117011a88ef2c337856671a0c56fd8a4..9b98a6e249c32bc846ea49a9ac12c4c6ecdce9a7 100644 (file)
 #define HAVE_FTRUNCATE 1
 #define HAVE_GETADDRINFO 1
 #define HAVE_GETEUID 1
-#define HAVE_GETHOSTBYADDR 1
 #define HAVE_GETHOSTBYNAME 1
 #define HAVE_GETHOSTNAME 1
 #define HAVE_GETPPID 1
index 413a36e33c2f1d9f87bf26d0d353d86c0f66c502..0535137befbb9848f237a7b2762bcfebaf313191 100644 (file)
 /* Define if you want the built-in manual */
 #define USE_MANUAL
 
-/* Define if you have the gethostbyaddr_r() function with 5 arguments */
-#undef HAVE_GETHOSTBYADDR_R_5
-
-/* Define if you have the gethostbyaddr_r() function with 7 arguments */
-#undef HAVE_GETHOSTBYADDR_R_7
-
-/* Define if you have the gethostbyaddr_r() function with 8 arguments */
-#undef HAVE_GETHOSTBYADDR_R_8
-
 /* Define if you have the gethostbyname_r() function with 3 arguments */
 #undef HAVE_GETHOSTBYNAME_R_3
 
 /* Define if you have the `geteuid' function. */
 #undef HAVE_GETEUID
 
-/* Define if you have the `gethostbyaddr' function. */
-#define HAVE_GETHOSTBYADDR
-
-/* Define if you have the `gethostbyaddr_r' function. */
-#undef HAVE_GETHOSTBYADDR_R
-
 /* Define if you have the `gethostbyname_r' function. */
 #undef HAVE_GETHOSTBYNAME_R
 
index a4619ad445870a8b228a06cef3f480126423d851..ab29bfccc29ca09d037dbdf262a2830d891e8802 100644 (file)
 /* Define to 1 if you have the `geteuid' function. */
 #define HAVE_GETEUID 1
 
-/* Define to 1 if you have the `gethostbyaddr' function. */
-#define HAVE_GETHOSTBYADDR 1
-
 /* If you have gethostbyname */
 #define HAVE_GETHOSTBYNAME 1
 
index 9774d5aba1044ccbadd46eae3f69a1bdcd266987..22d2b964a4fcda07a3be78a87ac6c15113e5034c 100644 (file)
 /* Define to 1 if you have the `geteuid' function. */
 /* #undef HAVE_GETEUID */
 
-/* Define to 1 if you have the gethostbyaddr function. */
-#define HAVE_GETHOSTBYADDR 1
-
-/* Define to 1 if you have the gethostbyaddr_r function. */
-#define HAVE_GETHOSTBYADDR_R 1
-
-/* gethostbyaddr_r() takes 5 args */
-/* #undef HAVE_GETHOSTBYADDR_R_5 */
-
-/* gethostbyaddr_r() takes 7 args */
-/* #undef HAVE_GETHOSTBYADDR_R_7 */
-
-/* gethostbyaddr_r() takes 8 args */
-#define HAVE_GETHOSTBYADDR_R_8 1
-
 /* Define to 1 if you have the gethostbyname function. */
 #define HAVE_GETHOSTBYNAME 1
 
index d81a08298289d67976eff87476669bc57ef1c997..3175133241970dff21a02f9a6e2df648d3309be6 100644 (file)
 /* Define to 1 if you have the getsockname function. */
 #define HAVE_GETSOCKNAME 1
 
-/* Define if you have the gethostbyaddr function. */
-#define HAVE_GETHOSTBYADDR 1
-
 /* Define if you have the gethostname function. */
 #define HAVE_GETHOSTNAME 1
 
index 8bee4f709e078a7fb4ce37ac99b10802557f2a91..a85320371ec81760485ce2c55d37a9305257c18d 100644 (file)
 /* Define if you don't have vprintf but do have _doprnt.  */
 /* #define HAVE_DOPRNT 1 */
 
-/* Define if you have the gethostbyaddr function.  */
-#define HAVE_GETHOSTBYADDR 1
-
 /* Define if you have the gethostname function.  */
 #define HAVE_GETHOSTNAME 1
 
index a1e271c55e14657ab07a0b9f81f144a54171a512..c90659f82fa22babe2f64170414cd2be82808789 100644 (file)
 /* Define to 1 if you have the `getppid' function. */
 #cmakedefine HAVE_GETPPID 1
 
-/* Define to 1 if you have the gethostbyaddr function. */
-#cmakedefine HAVE_GETHOSTBYADDR 1
-
-/* Define to 1 if you have the gethostbyaddr_r function. */
-#cmakedefine HAVE_GETHOSTBYADDR_R 1
-
-/* gethostbyaddr_r() takes 5 args */
-#cmakedefine HAVE_GETHOSTBYADDR_R_5 1
-
-/* gethostbyaddr_r() takes 7 args */
-#cmakedefine HAVE_GETHOSTBYADDR_R_7 1
-
-/* gethostbyaddr_r() takes 8 args */
-#cmakedefine HAVE_GETHOSTBYADDR_R_8 1
-
 /* Define to 1 if you have the gethostbyname function. */
 #cmakedefine HAVE_GETHOSTBYNAME 1
 
index ffade127d72355acf75f90e1d7dd36ad1dbdb144..d8e3e2858b3cc40bc9505feb51b78d925c8be7d4 100644 (file)
@@ -2136,245 +2136,6 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
 ])
 
 
-dnl CURL_CHECK_FUNC_GETHOSTBYADDR
-dnl -------------------------------------------------
-dnl Verify if gethostbyaddr is available, prototyped,
-dnl and can be compiled. If all of these are true,
-dnl and usage has not been previously disallowed with
-dnl shell variable curl_disallow_gethostbyaddr, then
-dnl HAVE_GETHOSTBYADDR will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYADDR], [
-  AC_REQUIRE([CURL_INCLUDES_WINSOCK2])dnl
-  AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
-  #
-  tst_links_gethostbyaddr="unknown"
-  tst_proto_gethostbyaddr="unknown"
-  tst_compi_gethostbyaddr="unknown"
-  tst_allow_gethostbyaddr="unknown"
-  #
-  AC_MSG_CHECKING([if gethostbyaddr can be linked])
-  AC_LINK_IFELSE([
-    AC_LANG_PROGRAM([[
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_netdb
-    ]],[[
-      if(0 != gethostbyaddr(0, 0, 0))
-        return 1;
-    ]])
-  ],[
-    AC_MSG_RESULT([yes])
-    tst_links_gethostbyaddr="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    tst_links_gethostbyaddr="no"
-  ])
-  #
-  if test "$tst_links_gethostbyaddr" = "yes"; then
-    AC_MSG_CHECKING([if gethostbyaddr is prototyped])
-    AC_EGREP_CPP([gethostbyaddr],[
-      $curl_includes_winsock2
-      $curl_includes_bsdsocket
-      $curl_includes_netdb
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_proto_gethostbyaddr="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_proto_gethostbyaddr="no"
-    ])
-  fi
-  #
-  if test "$tst_proto_gethostbyaddr" = "yes"; then
-    AC_MSG_CHECKING([if gethostbyaddr is compilable])
-    AC_COMPILE_IFELSE([
-      AC_LANG_PROGRAM([[
-        $curl_includes_winsock2
-      $curl_includes_bsdsocket
-        $curl_includes_netdb
-      ]],[[
-        if(0 != gethostbyaddr(0, 0, 0))
-          return 1;
-      ]])
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_compi_gethostbyaddr="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_compi_gethostbyaddr="no"
-    ])
-  fi
-  #
-  if test "$tst_compi_gethostbyaddr" = "yes"; then
-    AC_MSG_CHECKING([if gethostbyaddr usage allowed])
-    if test "x$curl_disallow_gethostbyaddr" != "xyes"; then
-      AC_MSG_RESULT([yes])
-      tst_allow_gethostbyaddr="yes"
-    else
-      AC_MSG_RESULT([no])
-      tst_allow_gethostbyaddr="no"
-    fi
-  fi
-  #
-  AC_MSG_CHECKING([if gethostbyaddr might be used])
-  if test "$tst_links_gethostbyaddr" = "yes" &&
-     test "$tst_proto_gethostbyaddr" = "yes" &&
-     test "$tst_compi_gethostbyaddr" = "yes" &&
-     test "$tst_allow_gethostbyaddr" = "yes"; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_GETHOSTBYADDR, 1,
-      [Define to 1 if you have the gethostbyaddr function.])
-    curl_cv_func_gethostbyaddr="yes"
-  else
-    AC_MSG_RESULT([no])
-    curl_cv_func_gethostbyaddr="no"
-  fi
-])
-
-
-dnl CURL_CHECK_FUNC_GETHOSTBYADDR_R
-dnl -------------------------------------------------
-dnl Verify if gethostbyaddr_r is available, prototyped,
-dnl and can be compiled. If all of these are true, and
-dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_gethostbyaddr_r, then
-dnl HAVE_GETHOSTBYADDR_R will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYADDR_R], [
-  AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
-  #
-  tst_links_gethostbyaddr_r="unknown"
-  tst_proto_gethostbyaddr_r="unknown"
-  tst_compi_gethostbyaddr_r="unknown"
-  tst_allow_gethostbyaddr_r="unknown"
-  tst_nargs_gethostbyaddr_r="unknown"
-  #
-  AC_MSG_CHECKING([if gethostbyaddr_r can be linked])
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([gethostbyaddr_r])
-  ],[
-    AC_MSG_RESULT([yes])
-    tst_links_gethostbyaddr_r="yes"
-  ],[
-    AC_MSG_RESULT([no])
-    tst_links_gethostbyaddr_r="no"
-  ])
-  #
-  if test "$tst_links_gethostbyaddr_r" = "yes"; then
-    AC_MSG_CHECKING([if gethostbyaddr_r is prototyped])
-    AC_EGREP_CPP([gethostbyaddr_r],[
-      $curl_includes_netdb
-    ],[
-      AC_MSG_RESULT([yes])
-      tst_proto_gethostbyaddr_r="yes"
-    ],[
-      AC_MSG_RESULT([no])
-      tst_proto_gethostbyaddr_r="no"
-    ])
-  fi
-  #
-  if test "$tst_proto_gethostbyaddr_r" = "yes"; then
-    if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
-      AC_MSG_CHECKING([if gethostbyaddr_r takes 5 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_netdb
-        ]],[[
-          if(0 != gethostbyaddr_r(0, 0, 0, 0, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_gethostbyaddr_r="yes"
-        tst_nargs_gethostbyaddr_r="5"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_gethostbyaddr_r="no"
-      ])
-    fi
-    if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
-      AC_MSG_CHECKING([if gethostbyaddr_r takes 7 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_netdb
-        ]],[[
-          if(0 != gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_gethostbyaddr_r="yes"
-        tst_nargs_gethostbyaddr_r="7"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_gethostbyaddr_r="no"
-      ])
-    fi
-    if test "$tst_nargs_gethostbyaddr_r" = "unknown"; then
-      AC_MSG_CHECKING([if gethostbyaddr_r takes 8 args.])
-      AC_COMPILE_IFELSE([
-        AC_LANG_PROGRAM([[
-          $curl_includes_netdb
-        ]],[[
-          if(0 != gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0, 0))
-            return 1;
-        ]])
-      ],[
-        AC_MSG_RESULT([yes])
-        tst_compi_gethostbyaddr_r="yes"
-        tst_nargs_gethostbyaddr_r="8"
-      ],[
-        AC_MSG_RESULT([no])
-        tst_compi_gethostbyaddr_r="no"
-      ])
-    fi
-    AC_MSG_CHECKING([if gethostbyaddr_r is compilable])
-    if test "$tst_compi_gethostbyaddr_r" = "yes"; then
-      AC_MSG_RESULT([yes])
-    else
-      AC_MSG_RESULT([no])
-    fi
-  fi
-  #
-  if test "$tst_compi_gethostbyaddr_r" = "yes"; then
-    AC_MSG_CHECKING([if gethostbyaddr_r usage allowed])
-    if test "x$curl_disallow_gethostbyaddr_r" != "xyes"; then
-      AC_MSG_RESULT([yes])
-      tst_allow_gethostbyaddr_r="yes"
-    else
-      AC_MSG_RESULT([no])
-      tst_allow_gethostbyaddr_r="no"
-    fi
-  fi
-  #
-  AC_MSG_CHECKING([if gethostbyaddr_r might be used])
-  if test "$tst_links_gethostbyaddr_r" = "yes" &&
-     test "$tst_proto_gethostbyaddr_r" = "yes" &&
-     test "$tst_compi_gethostbyaddr_r" = "yes" &&
-     test "$tst_allow_gethostbyaddr_r" = "yes"; then
-    AC_MSG_RESULT([yes])
-    AC_DEFINE_UNQUOTED(HAVE_GETHOSTBYADDR_R, 1,
-      [Define to 1 if you have the gethostbyaddr_r function.])
-    dnl AC_DEFINE_UNQUOTED(GETHOSTBYADDR_R_ARGS, $tst_nargs_gethostbyaddr_r,
-    dnl   [Specifies the number of arguments to gethostbyaddr_r])
-    #
-    if test "$tst_nargs_gethostbyaddr_r" -eq "5"; then
-      AC_DEFINE(HAVE_GETHOSTBYADDR_R_5, 1, [gethostbyaddr_r() takes 5 args])
-    elif test "$tst_nargs_gethostbyaddr_r" -eq "7"; then
-      AC_DEFINE(HAVE_GETHOSTBYADDR_R_7, 1, [gethostbyaddr_r() takes 7 args])
-    elif test "$tst_nargs_gethostbyaddr_r" -eq "8"; then
-      AC_DEFINE(HAVE_GETHOSTBYADDR_R_8, 1, [gethostbyaddr_r() takes 8 args])
-    fi
-    #
-    curl_cv_func_gethostbyaddr_r="yes"
-  else
-    AC_MSG_RESULT([no])
-    curl_cv_func_gethostbyaddr_r="no"
-  fi
-])
-
-
 dnl CURL_CHECK_FUNC_GETHOSTBYNAME
 dnl -------------------------------------------------
 dnl Verify if gethostbyname is available, prototyped,
index 3e4d6a96908d359bbecaa2df5e1a16a86d22b24e..1ca047908cffe4b5b4f216b77d7537f757b41025 100644 (file)
@@ -214,39 +214,6 @@ AC_DEFUN([CURL_CHECK_NEED_REENTRANT_STRTOK_R], [
 ])
 
 
-dnl CURL_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
-dnl -------------------------------------------------
-dnl Checks if the preprocessor _REENTRANT definition
-dnl makes function gethostbyaddr_r compiler visible.
-
-AC_DEFUN([CURL_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R], [
-  AC_LINK_IFELSE([
-    AC_LANG_FUNC_LINK_TRY([gethostbyaddr_r])
-  ],[
-    tmp_gethostbyaddr_r="yes"
-  ],[
-    tmp_gethostbyaddr_r="no"
-  ])
-  if test "$tmp_gethostbyaddr_r" = "yes"; then
-    AC_EGREP_CPP([gethostbyaddr_r],[
-#include <sys/types.h>
-#include <netdb.h>
-    ],[
-      tmp_gethostbyaddr_r="proto_declared"
-    ],[
-      AC_EGREP_CPP([gethostbyaddr_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
-      ],[
-        tmp_gethostbyaddr_r="proto_needs_reentrant"
-        tmp_need_reentrant="yes"
-      ])
-    ])
-  fi
-])
-
-
 dnl CURL_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
 dnl -------------------------------------------------
 dnl Checks if the preprocessor _REENTRANT definition
@@ -332,9 +299,6 @@ AC_DEFUN([CURL_CHECK_NEED_REENTRANT_FUNCTIONS_R], [
   if test "$tmp_need_reentrant" = "no"; then
     CURL_CHECK_NEED_REENTRANT_STRTOK_R
   fi
-  if test "$tmp_need_reentrant" = "no"; then
-    CURL_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
-  fi
   if test "$tmp_need_reentrant" = "no"; then
     CURL_CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
   fi