summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGergely Nagy <ngg@tresorit.com>2021-06-18 10:39:35 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-06-18 13:52:21 +0200
commit6f5ff0ee04e2bcaf16bf2121c533bea38581cfe7 (patch)
tree1bf3a868c29c4e9bb25224e19850b9687b17aa22 /m4
parentf471efa78c64e405b61a195f072f8b759905f43f (diff)
downloadcurl-6f5ff0ee04e2bcaf16bf2121c533bea38581cfe7.tar.gz
configure/cmake: remove checks for unused gethostbyaddr and gethostbyaddr_r
Closes #7276
Diffstat (limited to 'm4')
-rw-r--r--m4/curl-functions.m4239
-rw-r--r--m4/curl-reentrant.m436
2 files changed, 0 insertions, 275 deletions
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index ffade127d..d8e3e2858 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -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,
diff --git a/m4/curl-reentrant.m4 b/m4/curl-reentrant.m4
index 3e4d6a969..1ca047908 100644
--- a/m4/curl-reentrant.m4
+++ b/m4/curl-reentrant.m4
@@ -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
@@ -333,9 +300,6 @@ AC_DEFUN([CURL_CHECK_NEED_REENTRANT_FUNCTIONS_R], [
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
if test "$tmp_need_reentrant" = "no"; then