diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-06-27 13:52:57 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-06-27 13:53:26 +0200 |
commit | a10c974e1a5c853354ad54c574ad22e1ed46ea9f (patch) | |
tree | 9f7e96c042193bc4c648d714185c81518e2212d6 /acinclude.m4 | |
parent | 0aeca41702d2a70f7d253451781fe52398aab257 (diff) | |
download | curl-a10c974e1a5c853354ad54c574ad22e1ed46ea9f.tar.gz |
configure: remove CURL_CHECK_NI_WITHSCOPEID too
Since it isn't used either and requires the getnameinfo check
Follow-up to 0aeca41702d2
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index b72839e3a..f32e86cda 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -997,107 +997,6 @@ AC_DEFUN([TYPE_SOCKADDR_STORAGE], ]) ]) - -dnl CURL_CHECK_NI_WITHSCOPEID -dnl ------------------------------------------------- -dnl Check for working NI_WITHSCOPEID in getnameinfo() - -AC_DEFUN([CURL_CHECK_NI_WITHSCOPEID], [ - AC_REQUIRE([CURL_CHECK_FUNC_GETNAMEINFO])dnl - AC_REQUIRE([TYPE_SOCKADDR_STORAGE])dnl - AC_CHECK_HEADERS(stdio.h sys/types.h sys/socket.h \ - netdb.h netinet/in.h arpa/inet.h) - # - AC_CACHE_CHECK([for working NI_WITHSCOPEID], - [curl_cv_working_ni_withscopeid], [ - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#ifdef HAVE_STDIO_H -#include <stdio.h> -#endif -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#ifdef HAVE_NETDB_H -#include <netdb.h> -#endif -#ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif -#ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> -#endif - ]],[[ -#if defined(NI_WITHSCOPEID) && defined(HAVE_GETNAMEINFO) -#ifdef HAVE_STRUCT_SOCKADDR_STORAGE - struct sockaddr_storage sa; -#else - unsigned char sa[256]; -#endif - char hostbuf[NI_MAXHOST]; - int rc; - GETNAMEINFO_TYPE_ARG2 salen = (GETNAMEINFO_TYPE_ARG2)sizeof(sa); - GETNAMEINFO_TYPE_ARG46 hostlen = (GETNAMEINFO_TYPE_ARG46)sizeof(hostbuf); - GETNAMEINFO_TYPE_ARG7 flags = NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID; - int fd = socket(AF_INET6, SOCK_STREAM, 0); - if(fd < 0) { - perror("socket()"); - return 1; /* Error creating socket */ - } - rc = getsockname(fd, (GETNAMEINFO_TYPE_ARG1)&sa, &salen); - if(rc) { - perror("getsockname()"); - return 2; /* Error retrieving socket name */ - } - rc = getnameinfo((GETNAMEINFO_TYPE_ARG1)&sa, salen, hostbuf, hostlen, NULL, 0, flags); - if(rc) { - printf("rc = %s\n", gai_strerror(rc)); - return 3; /* Error translating socket address */ - } - return 0; /* Ok, NI_WITHSCOPEID works */ -#else - return 4; /* Error, NI_WITHSCOPEID not defined or no getnameinfo() */ -#endif - ]]) # AC-LANG-PROGRAM - ],[ - # Exit code == 0. Program worked. - curl_cv_working_ni_withscopeid="yes" - ],[ - # Exit code != 0. Program failed. - curl_cv_working_ni_withscopeid="no" - ],[ - # Program is not run when cross-compiling. So we assume - # NI_WITHSCOPEID will work if we are able to compile it. - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#include <sys/types.h> -#include <sys/socket.h> -#include <netdb.h> - ]],[[ - unsigned int dummy= NI_NUMERICHOST | NI_NUMERICSERV | NI_WITHSCOPEID; - ]]) - ],[ - curl_cv_working_ni_withscopeid="yes" - ],[ - curl_cv_working_ni_withscopeid="no" - ]) # AC-COMPILE-IFELSE - ]) # AC-RUN-IFELSE - ]) # AC-CACHE-CHECK - case "$curl_cv_working_ni_withscopeid" in - yes) - AC_DEFINE(HAVE_NI_WITHSCOPEID, 1, - [Define to 1 if NI_WITHSCOPEID exists and works.]) - ;; - esac -]) - - dnl CURL_CHECK_FUNC_RECV dnl ------------------------------------------------- dnl Test if the socket recv() function is available, |