diff options
author | Gergely Nagy <ngg@tresorit.com> | 2021-06-18 10:16:16 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-06-18 13:52:18 +0200 |
commit | f471efa78c64e405b61a195f072f8b759905f43f (patch) | |
tree | 697e5d4bf542f6b37cc7b873015ff26bfd0fc05c /m4 | |
parent | e92603289aaf05649e3e66464fa5363dae714fe0 (diff) | |
download | curl-f471efa78c64e405b61a195f072f8b759905f43f.tar.gz |
configure/cmake: remove checks for unused inet_ntoa and inet_ntoa_r
Closes #7276
Diffstat (limited to 'm4')
-rw-r--r-- | m4/curl-functions.m4 | 124 | ||||
-rw-r--r-- | m4/curl-reentrant.m4 | 40 |
2 files changed, 0 insertions, 164 deletions
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 index 1a21ca0be..ffade127d 100644 --- a/m4/curl-functions.m4 +++ b/m4/curl-functions.m4 @@ -3388,130 +3388,6 @@ AC_DEFUN([CURL_CHECK_FUNC_GMTIME_R], [ ]) -dnl CURL_CHECK_FUNC_INET_NTOA_R -dnl ------------------------------------------------- -dnl Verify if inet_ntoa_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_inet_ntoa_r, then -dnl HAVE_INET_NTOA_R will be defined. - -AC_DEFUN([CURL_CHECK_FUNC_INET_NTOA_R], [ - AC_REQUIRE([CURL_INCLUDES_ARPA_INET])dnl - # - tst_links_inet_ntoa_r="unknown" - tst_proto_inet_ntoa_r="unknown" - tst_compi_inet_ntoa_r="unknown" - tst_allow_inet_ntoa_r="unknown" - tst_nargs_inet_ntoa_r="unknown" - # - AC_MSG_CHECKING([if inet_ntoa_r can be linked]) - AC_LINK_IFELSE([ - AC_LANG_FUNC_LINK_TRY([inet_ntoa_r]) - ],[ - AC_MSG_RESULT([yes]) - tst_links_inet_ntoa_r="yes" - ],[ - AC_MSG_RESULT([no]) - tst_links_inet_ntoa_r="no" - ]) - # - if test "$tst_links_inet_ntoa_r" = "yes"; then - AC_MSG_CHECKING([if inet_ntoa_r is prototyped]) - AC_EGREP_CPP([inet_ntoa_r],[ - $curl_includes_arpa_inet - ],[ - AC_MSG_RESULT([yes]) - tst_proto_inet_ntoa_r="yes" - ],[ - AC_MSG_RESULT([no]) - tst_proto_inet_ntoa_r="no" - ]) - fi - # - if test "$tst_proto_inet_ntoa_r" = "yes"; then - if test "$tst_nargs_inet_ntoa_r" = "unknown"; then - AC_MSG_CHECKING([if inet_ntoa_r takes 2 args.]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ - $curl_includes_arpa_inet - ]],[[ - struct in_addr addr; - if(0 != inet_ntoa_r(addr, 0)) - return 1; - ]]) - ],[ - AC_MSG_RESULT([yes]) - tst_compi_inet_ntoa_r="yes" - tst_nargs_inet_ntoa_r="2" - ],[ - AC_MSG_RESULT([no]) - tst_compi_inet_ntoa_r="no" - ]) - fi - if test "$tst_nargs_inet_ntoa_r" = "unknown"; then - AC_MSG_CHECKING([if inet_ntoa_r takes 3 args.]) - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ - $curl_includes_arpa_inet - ]],[[ - struct in_addr addr; - if(0 != inet_ntoa_r(addr, 0, 0)) - return 1; - ]]) - ],[ - AC_MSG_RESULT([yes]) - tst_compi_inet_ntoa_r="yes" - tst_nargs_inet_ntoa_r="3" - ],[ - AC_MSG_RESULT([no]) - tst_compi_inet_ntoa_r="no" - ]) - fi - AC_MSG_CHECKING([if inet_ntoa_r is compilable]) - if test "$tst_compi_inet_ntoa_r" = "yes"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - fi - # - if test "$tst_compi_inet_ntoa_r" = "yes"; then - AC_MSG_CHECKING([if inet_ntoa_r usage allowed]) - if test "x$curl_disallow_inet_ntoa_r" != "xyes"; then - AC_MSG_RESULT([yes]) - tst_allow_inet_ntoa_r="yes" - else - AC_MSG_RESULT([no]) - tst_allow_inet_ntoa_r="no" - fi - fi - # - AC_MSG_CHECKING([if inet_ntoa_r might be used]) - if test "$tst_links_inet_ntoa_r" = "yes" && - test "$tst_proto_inet_ntoa_r" = "yes" && - test "$tst_compi_inet_ntoa_r" = "yes" && - test "$tst_allow_inet_ntoa_r" = "yes"; then - AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED(HAVE_INET_NTOA_R, 1, - [Define to 1 if you have the inet_ntoa_r function.]) - dnl AC_DEFINE_UNQUOTED(INET_NTOA_R_ARGS, $tst_nargs_inet_ntoa_r, - dnl [Specifies the number of arguments to inet_ntoa_r]) - # - if test "$tst_nargs_inet_ntoa_r" -eq "2"; then - AC_DEFINE(HAVE_INET_NTOA_R_2, 1, [inet_ntoa_r() takes 2 args]) - elif test "$tst_nargs_inet_ntoa_r" -eq "3"; then - AC_DEFINE(HAVE_INET_NTOA_R_3, 1, [inet_ntoa_r() takes 3 args]) - fi - # - curl_cv_func_inet_ntoa_r="yes" - else - AC_MSG_RESULT([no]) - curl_cv_func_inet_ntoa_r="no" - fi -]) - - dnl CURL_CHECK_FUNC_INET_NTOP dnl ------------------------------------------------- dnl Verify if inet_ntop is available, prototyped, can diff --git a/m4/curl-reentrant.m4 b/m4/curl-reentrant.m4 index 4655b0547..3e4d6a969 100644 --- a/m4/curl-reentrant.m4 +++ b/m4/curl-reentrant.m4 @@ -214,43 +214,6 @@ AC_DEFUN([CURL_CHECK_NEED_REENTRANT_STRTOK_R], [ ]) -dnl CURL_CHECK_NEED_REENTRANT_INET_NTOA_R -dnl ------------------------------------------------- -dnl Checks if the preprocessor _REENTRANT definition -dnl makes function inet_ntoa_r compiler visible. - -AC_DEFUN([CURL_CHECK_NEED_REENTRANT_INET_NTOA_R], [ - AC_LINK_IFELSE([ - AC_LANG_FUNC_LINK_TRY([inet_ntoa_r]) - ],[ - tmp_inet_ntoa_r="yes" - ],[ - tmp_inet_ntoa_r="no" - ]) - if test "$tmp_inet_ntoa_r" = "yes"; then - AC_EGREP_CPP([inet_ntoa_r],[ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> - ],[ - tmp_inet_ntoa_r="proto_declared" - ],[ - AC_EGREP_CPP([inet_ntoa_r],[ -#define _REENTRANT -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> - ],[ - tmp_inet_ntoa_r="proto_needs_reentrant" - tmp_need_reentrant="yes" - ]) - ]) - fi -]) - - dnl CURL_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R dnl ------------------------------------------------- dnl Checks if the preprocessor _REENTRANT definition @@ -370,9 +333,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_INET_NTOA_R - fi - if test "$tmp_need_reentrant" = "no"; then CURL_CHECK_NEED_REENTRANT_GETHOSTBYADDR_R fi if test "$tmp_need_reentrant" = "no"; then |