]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure/cmake: remove checks for unused getservbyport_r
authorGergely Nagy <ngg@tresorit.com>
Fri, 18 Jun 2021 07:47:39 +0000 (09:47 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 18 Jun 2021 11:51:45 +0000 (13:51 +0200)
Closes #7276

configure.ac
lib/config-vxworks.h
lib/curl_config.h.cmake
m4/curl-functions.m4
m4/curl-reentrant.m4

index 050d2b84bec9e13b787c66f88d24269e08115d61..ef82d3d3c75d5e291fe4202a0053e7ab90d99205 100644 (file)
@@ -3234,7 +3234,6 @@ CURL_CHECK_FUNC_GETPEERNAME
 CURL_CHECK_FUNC_GETSOCKNAME
 CURL_CHECK_FUNC_IF_NAMETOINDEX
 CURL_CHECK_FUNC_GETIFADDRS
-CURL_CHECK_FUNC_GETSERVBYPORT_R
 CURL_CHECK_FUNC_GMTIME_R
 CURL_CHECK_FUNC_INET_NTOA_R
 CURL_CHECK_FUNC_INET_NTOP
index dc46373be1d5f3c8e83dff9f90e843cc23e241f3..18927a850b4af8dafb5a880b18963817edef6c04 100644 (file)
 /* Define if you want to enable IPv6 support */
 #define ENABLE_IPV6 1
 
-/* Specifies the number of arguments to getservbyport_r */
-#define GETSERVBYPORT_R_ARGS 6
-
-/* Specifies the size of the buffer to pass to getservbyport_r */
-#define GETSERVBYPORT_R_BUFSIZE 4096
-
 /* Define to 1 if you have the alarm function. */
 #define HAVE_ALARM 1
 
 /* Define to 1 if you have the `getrlimit' function. */
 #define HAVE_GETRLIMIT 1
 
-/* Define to 1 if you have the getservbyport_r function. */
-/* #undef HAVE_GETSERVBYPORT_R */
-
 /* Define to 1 if you have the `gettimeofday' function. */
 /* #undef HAVE_GETTIMEOFDAY */
 
index 96a19afc51e71b7a6977148cb028939d5e77ac7b..de9ee18c25b13382e807923df5aca5e202518fcf 100644 (file)
 /* Define if you want to enable IPv6 support */
 #cmakedefine ENABLE_IPV6 1
 
-/* Specifies the number of arguments to getservbyport_r */
-#cmakedefine GETSERVBYPORT_R_ARGS ${GETSERVBYPORT_R_ARGS}
-
-/* Specifies the size of the buffer to pass to getservbyport_r */
-#cmakedefine GETSERVBYPORT_R_BUFSIZE ${GETSERVBYPORT_R_BUFSIZE}
-
 /* Define to 1 if you have the alarm function. */
 #cmakedefine HAVE_ALARM 1
 
 /* Define to 1 if you have the `getrlimit' function. */
 #cmakedefine HAVE_GETRLIMIT 1
 
-/* Define to 1 if you have the getservbyport_r function. */
-#cmakedefine HAVE_GETSERVBYPORT_R 1
-
 /* Define to 1 if you have the `gettimeofday' function. */
 #cmakedefine HAVE_GETTIMEOFDAY 1
 
index d49713df675257f80f0467f4cf79a7bc009a515c..a5266ce9bcf36625142fc5bd9bd7820b2556372f 100644 (file)
@@ -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
index 94e76b6880078c963c286ca7c049ad4057b1d82e..4655b054751b39702e5cc67494791bbef7e6cd5b 100644 (file)
@@ -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
 ])