summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGergely Nagy <ngg@tresorit.com>2021-06-18 09:47:39 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-06-18 13:51:45 +0200
commit67af0f7eae10367d7207e18eff514f4fa417ec45 (patch)
tree0129a25f6b3392de2621e090c968b81dfe4b48c5 /m4
parent7020be7d85ffcca4f069bfb6346cb82c603f15c5 (diff)
downloadcurl-67af0f7eae10367d7207e18eff514f4fa417ec45.tar.gz
configure/cmake: remove checks for unused getservbyport_r
Closes #7276
Diffstat (limited to 'm4')
-rw-r--r--m4/curl-functions.m4140
-rw-r--r--m4/curl-reentrant.m436
2 files changed, 0 insertions, 176 deletions
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index d49713df6..a5266ce9b 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -3330,146 +3330,6 @@ AC_DEFUN([CURL_CHECK_FUNC_GETIFADDRS], [
])
-dnl CURL_CHECK_FUNC_GETSERVBYPORT_R
-dnl -------------------------------------------------
-dnl Verify if getservbyport_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_getservbyport_r, then
-dnl HAVE_GETSERVBYPORT_R will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_GETSERVBYPORT_R], [
- AC_REQUIRE([CURL_INCLUDES_NETDB])dnl
- #
- tst_links_getservbyport_r="unknown"
- tst_proto_getservbyport_r="unknown"
- tst_compi_getservbyport_r="unknown"
- tst_allow_getservbyport_r="unknown"
- tst_nargs_getservbyport_r="unknown"
- #
- AC_MSG_CHECKING([if getservbyport_r can be linked])
- AC_LINK_IFELSE([
- AC_LANG_FUNC_LINK_TRY([getservbyport_r])
- ],[
- AC_MSG_RESULT([yes])
- tst_links_getservbyport_r="yes"
- ],[
- AC_MSG_RESULT([no])
- tst_links_getservbyport_r="no"
- ])
- #
- if test "$tst_links_getservbyport_r" = "yes"; then
- AC_MSG_CHECKING([if getservbyport_r is prototyped])
- AC_EGREP_CPP([getservbyport_r],[
- $curl_includes_netdb
- ],[
- AC_MSG_RESULT([yes])
- tst_proto_getservbyport_r="yes"
- ],[
- AC_MSG_RESULT([no])
- tst_proto_getservbyport_r="no"
- ])
- fi
- #
- if test "$tst_proto_getservbyport_r" = "yes"; then
- if test "$tst_nargs_getservbyport_r" = "unknown"; then
- AC_MSG_CHECKING([if getservbyport_r takes 4 args.])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
- $curl_includes_netdb
- ]],[[
- if(0 != getservbyport_r(0, 0, 0, 0))
- return 1;
- ]])
- ],[
- AC_MSG_RESULT([yes])
- tst_compi_getservbyport_r="yes"
- tst_nargs_getservbyport_r="4"
- ],[
- AC_MSG_RESULT([no])
- tst_compi_getservbyport_r="no"
- ])
- fi
- if test "$tst_nargs_getservbyport_r" = "unknown"; then
- AC_MSG_CHECKING([if getservbyport_r takes 5 args.])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
- $curl_includes_netdb
- ]],[[
- if(0 != getservbyport_r(0, 0, 0, 0, 0))
- return 1;
- ]])
- ],[
- AC_MSG_RESULT([yes])
- tst_compi_getservbyport_r="yes"
- tst_nargs_getservbyport_r="5"
- ],[
- AC_MSG_RESULT([no])
- tst_compi_getservbyport_r="no"
- ])
- fi
- if test "$tst_nargs_getservbyport_r" = "unknown"; then
- AC_MSG_CHECKING([if getservbyport_r takes 6 args.])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
- $curl_includes_netdb
- ]],[[
- if(0 != getservbyport_r(0, 0, 0, 0, 0, 0))
- return 1;
- ]])
- ],[
- AC_MSG_RESULT([yes])
- tst_compi_getservbyport_r="yes"
- tst_nargs_getservbyport_r="6"
- ],[
- AC_MSG_RESULT([no])
- tst_compi_getservbyport_r="no"
- ])
- fi
- AC_MSG_CHECKING([if getservbyport_r is compilable])
- if test "$tst_compi_getservbyport_r" = "yes"; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- fi
- #
- if test "$tst_compi_getservbyport_r" = "yes"; then
- AC_MSG_CHECKING([if getservbyport_r usage allowed])
- if test "x$curl_disallow_getservbyport_r" != "xyes"; then
- AC_MSG_RESULT([yes])
- tst_allow_getservbyport_r="yes"
- else
- AC_MSG_RESULT([no])
- tst_allow_getservbyport_r="no"
- fi
- fi
- #
- AC_MSG_CHECKING([if getservbyport_r might be used])
- if test "$tst_links_getservbyport_r" = "yes" &&
- test "$tst_proto_getservbyport_r" = "yes" &&
- test "$tst_compi_getservbyport_r" = "yes" &&
- test "$tst_allow_getservbyport_r" = "yes"; then
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_GETSERVBYPORT_R, 1,
- [Define to 1 if you have the getservbyport_r function.])
- AC_DEFINE_UNQUOTED(GETSERVBYPORT_R_ARGS, $tst_nargs_getservbyport_r,
- [Specifies the number of arguments to getservbyport_r])
- if test "$tst_nargs_getservbyport_r" -eq "4"; then
- AC_DEFINE(GETSERVBYPORT_R_BUFSIZE, sizeof(struct servent_data),
- [Specifies the size of the buffer to pass to getservbyport_r])
- else
- AC_DEFINE(GETSERVBYPORT_R_BUFSIZE, 4096,
- [Specifies the size of the buffer to pass to getservbyport_r])
- fi
- curl_cv_func_getservbyport_r="yes"
- else
- AC_MSG_RESULT([no])
- curl_cv_func_getservbyport_r="no"
- fi
-])
-
-
dnl CURL_CHECK_FUNC_GETXATTR
dnl -------------------------------------------------
dnl Verify if getxattr is available, prototyped, and
diff --git a/m4/curl-reentrant.m4 b/m4/curl-reentrant.m4
index 94e76b688..4655b0547 100644
--- a/m4/curl-reentrant.m4
+++ b/m4/curl-reentrant.m4
@@ -350,39 +350,6 @@ AC_DEFUN([CURL_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [
])
-dnl CURL_CHECK_NEED_REENTRANT_GETSERVBYPORT_R
-dnl -------------------------------------------------
-dnl Checks if the preprocessor _REENTRANT definition
-dnl makes function getservbyport_r compiler visible.
-
-AC_DEFUN([CURL_CHECK_NEED_REENTRANT_GETSERVBYPORT_R], [
- AC_LINK_IFELSE([
- AC_LANG_FUNC_LINK_TRY([getservbyport_r])
- ],[
- tmp_getservbyport_r="yes"
- ],[
- tmp_getservbyport_r="no"
- ])
- if test "$tmp_getservbyport_r" = "yes"; then
- AC_EGREP_CPP([getservbyport_r],[
-#include <sys/types.h>
-#include <netdb.h>
- ],[
- tmp_getservbyport_r="proto_declared"
- ],[
- AC_EGREP_CPP([getservbyport_r],[
-#define _REENTRANT
-#include <sys/types.h>
-#include <netdb.h>
- ],[
- tmp_getservbyport_r="proto_needs_reentrant"
- tmp_need_reentrant="yes"
- ])
- ])
- fi
-])
-
-
dnl CURL_CHECK_NEED_REENTRANT_FUNCTIONS_R
dnl -------------------------------------------------
dnl Checks if the preprocessor _REENTRANT definition
@@ -414,9 +381,6 @@ AC_DEFUN([CURL_CHECK_NEED_REENTRANT_FUNCTIONS_R], [
if test "$tmp_need_reentrant" = "no"; then
CURL_CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
fi
- if test "$tmp_need_reentrant" = "no"; then
- CURL_CHECK_NEED_REENTRANT_GETSERVBYPORT_R
- fi
])