From fad15654b1900a9af59d9dabf705060c6f9f058d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Thu, 19 Nov 2015 11:24:44 +0000 Subject: Remove configure --enable-ipv6 option It's an ancient obsolete option with a confusing name. Change-Id: Ib10330cf859cdea18fed2077c6539e56350ef380 Reviewed-on: https://code.wireshark.org/review/11967 Reviewed-by: Alexis La Goutte Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- Makefile.nmake | 1 - acinclude.m4 | 118 ------------------------------------------- caputils/capture-pcap-util.c | 4 -- cmakeconfig.h.in | 9 ---- config.h.win32 | 3 -- config.nmake | 2 - configure.ac | 16 ------ epan/addr_resolv.c | 8 +-- file.c | 2 +- ui/qt/Wireshark.pro | 2 +- 10 files changed, 4 insertions(+), 161 deletions(-) diff --git a/Makefile.nmake b/Makefile.nmake index 63fc01354b..d934e7e6fe 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -508,7 +508,6 @@ config.h : config.h.win32 config.nmake -e "s/@HAVE_GEOIP_V6@/$(GEOIP_V6_CONFIG)/" \ -e "s/@HAVE_LIBSSH/$(LIBSSH_CONFIG)/" \ -e "s/@HAVE_SOFTWARE_UPDATE@/$(WINSPARKLE_CONFIG)/" \ - -e "s/@INET6@/$(INET6_CONFIG)/" \ -e "s/@HAVE_NTDDNDIS_H@/$(NTDDNDIS_CONFIG)/" \ -e "s/@PCAP_NG_DEFAULT@/$(PCAP_NG_DEFAULT)/" \ -e "s/@WANT_PACKET_EDITOR@/$(WANT_PACKET_EDITOR)/" \ diff --git a/acinclude.m4 b/acinclude.m4 index 2a0caea975..91b76cf6a3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -147,124 +147,6 @@ fi ]) -# -# AC_WIRESHARK_IPV6_STACK -# -# By Jun-ichiro "itojun" Hagino, -# -AC_DEFUN([AC_WIRESHARK_IPV6_STACK], -[ - v6type=unknown - v6lib=none - - AC_MSG_CHECKING([ipv6 stack type]) - for i in v6d toshiba kame inria zeta linux linux-glibc solaris; do - case $i in - v6d) - AC_EGREP_CPP(yes, [ -#include -#ifdef __V6D__ -yes -#endif], - [v6type=$i; v6lib=v6; - v6libdir=/usr/local/v6/lib; - # - # XXX - this doesn't define INET6; - # is that a mistake? - # - CPPFLAGS="-I/usr/local/v6/include $CPPFLAGS"]) - ;; - toshiba) - AC_EGREP_CPP(yes, [ -#include -#ifdef _TOSHIBA_INET6 -yes -#endif], - [v6type=$i; v6lib=inet6; - v6libdir=/usr/local/v6/lib; - AC_DEFINE(INET6, 1, [Define if the platform supports IPv6])]) - ;; - kame) - AC_EGREP_CPP(yes, [ -#include -#ifdef __KAME__ -yes -#endif], - [v6type=$i; v6lib=inet6; - v6libdir=/usr/local/v6/lib; - AC_DEFINE(INET6, 1, [Define if the platform supports IPv6])]) - ;; - inria) - AC_EGREP_CPP(yes, [ -#include -#ifdef IPV6_INRIA_VERSION -yes -#endif], - [v6type=$i; - AC_DEFINE(INET6, 1, [Define if the platform supports IPv6])]) - ;; - zeta) - AC_EGREP_CPP(yes, [ -#include -#ifdef _ZETA_MINAMI_INET6 -yes -#endif], - [v6type=$i; v6lib=inet6; - v6libdir=/usr/local/v6/lib; - AC_DEFINE(INET6, 1, [Define if the platform supports IPv6])]) - ;; - linux) - if test -d /usr/inet6; then - v6type=$i - v6lib=inet6 - v6libdir=/usr/inet6 - AC_DEFINE(INET6, 1, [Define if the platform supports IPv6]) - fi - ;; - linux-glibc) - AC_EGREP_CPP(yes, [ -#include -#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) -#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || __GLIBC__ > 2 -yes -#endif -#endif], - [v6type=$i; v6lib=inet6; - AC_DEFINE(INET6, 1, [Define if the platform supports IPv6])]) - ;; - solaris) - # - # There's nothing we can check for in the header - # file, so we just check for SunOS (pre-SunOS 5 - # versions didn't include IPv6 support, so we - # just check the OS, not the version). - # - if test "`uname -s`" = "SunOS"; then - v6type=$i - v6lib=inet6 - AC_DEFINE(INET6, 1, [Define if the platform supports IPv6]) - fi - ;; - esac - if test "$v6type" != "unknown"; then - break - fi - done - - if test "$v6lib" != "none"; then - for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do - if test -d $dir -a -f $dir/lib$v6lib.a; then - LIBS="-L$dir $LIBS -l$v6lib" - break - fi - done - enable_ipv6="yes" - else - enable_ipv6="no" - fi - AC_MSG_RESULT(["$v6type, $v6lib"]) -]) - # # AC_WIRESHARK_GETADDRINFO_LIB_CHECK # diff --git a/caputils/capture-pcap-util.c b/caputils/capture-pcap-util.c index 9133a3dca1..62a75b7599 100644 --- a/caputils/capture-pcap-util.c +++ b/caputils/capture-pcap-util.c @@ -373,9 +373,7 @@ if_info_add_address(if_info_t *if_info, struct sockaddr *addr) { if_addr_t *if_addr; struct sockaddr_in *ai; -#ifdef INET6 struct sockaddr_in6 *ai6; -#endif switch (addr->sa_family) { @@ -388,7 +386,6 @@ if_info_add_address(if_info_t *if_info, struct sockaddr *addr) if_info->addrs = g_slist_append(if_info->addrs, if_addr); break; -#ifdef INET6 case AF_INET6: ai6 = (struct sockaddr_in6 *)(void *)addr; if_addr = (if_addr_t *)g_malloc(sizeof(*if_addr)); @@ -398,7 +395,6 @@ if_info_add_address(if_info_t *if_info, struct sockaddr *addr) sizeof if_addr->addr.ip6_addr); if_info->addrs = g_slist_append(if_info->addrs, if_addr); break; -#endif } } diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index 81812f1f94..4672f3add9 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -427,15 +427,6 @@ However, we do need it for some headers that are shared between C and C++. */ #define _U_ ${C_UNUSED} -/* We don't bother checking for IPv6 support; the checks done in the - autoconf script are relics of a bygone age, where IPv6 support in - OSes was sometimes present by default, sometimes provided by - third-party add-ons, and sometimes completely absent, and where the - particular flavor of IPv6 support mattered to us. We'll just wire it - on, unless and until that becomes an issue on platforms where people - use CMake. */ -#define INET6 1 - #if defined(_WIN32) /* WpdPack/INclude/pcap/pcap.h checks for "#if defined(WIN32)" */ diff --git a/config.h.win32 b/config.h.win32 index 0a60f7d6d7..aa00b12174 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -210,9 +210,6 @@ /* Define to enable WinSparkle software updates */ @HAVE_SOFTWARE_UPDATE@ -/* Define for IPv6 */ -@INET6@ - /* Define to have ntddndis.h */ @HAVE_NTDDNDIS_H@ diff --git a/config.nmake b/config.nmake index 2619486457..869ff5ca64 100644 --- a/config.nmake +++ b/config.nmake @@ -1774,6 +1774,4 @@ LIBWIRESHARK_CONFIG= # Construct the path PATH=$(PATH);$(CYGWIN_PATH);$(GTK_DIR)\bin;$(GETTEXT_DIR)\bin;$(ZLIB_PATH);$(ADNS_PATH) -INET6_CONFIG=^#define INET6 1 - NTDDNDIS_CONFIG=^#define HAVE_NTDDNDIS_H 1 diff --git a/configure.ac b/configure.ac index b274531f28..9cfa254e5f 100644 --- a/configure.ac +++ b/configure.ac @@ -2543,21 +2543,6 @@ fi AM_CONDITIONAL(HAVE_LIBPORTAUDIO, test x$want_portaudio = xyes) -dnl ipv6 check -AC_ARG_ENABLE(ipv6, - AC_HELP_STRING( [--enable-ipv6], - [use IPv6 name resolution, if available @<:@default=yes@:>@]), - enable_ipv6=$enableval,enable_ipv6=yes) - -AC_MSG_CHECKING(whether to enable ipv6 name resolution if available) -if test "x$enable_ipv6" = "xno" ; then - AC_MSG_RESULT(no) -else - AC_MSG_RESULT(yes) - AC_WIRESHARK_IPV6_STACK -fi - - dnl Check if dumpcap should be installed with filesystem capabilities AC_PATH_PROG(SETCAP, setcap) AC_ARG_ENABLE(setcap-install, @@ -3483,7 +3468,6 @@ echo " Use GNU ADNS library : $adns_message" echo " Use SMI MIB library : $libsmi_message" echo " Use GNU crypto library : $gcrypt_message" echo " Use SSL crypto library : $ssl_message" -echo " Use IPv6 name resolution : $enable_ipv6" echo " Use gnutls library : $tls_message" echo " Use POSIX capabilities library : $libcap_message" echo " Use GeoIP library : $geoip_message" diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index 35547da0f4..4de34637db 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -93,12 +93,12 @@ # include "wsutil/inet_v6defs.h" #endif -#if defined(_WIN32) && defined(INET6) +#ifdef _WIN32 # include #endif #ifdef HAVE_C_ARES -# if defined(_WIN32) && !defined(INET6) +# ifdef _WIN32 # define socklen_t unsigned int # endif # include @@ -904,7 +904,6 @@ static hashipv6_t * host_lookup6(const struct e_in6_addr *addr, gboolean *found) { hashipv6_t * volatile tp; -#ifdef INET6 #ifdef HAVE_C_ARES async_dns_queue_msg_t *caqm; #elif defined(HAVE_GETADDRINFO) @@ -912,7 +911,6 @@ host_lookup6(const struct e_in6_addr *addr, gboolean *found) #elif defined(HAVE_GETHOSTBYNAME) struct hostent *hostp; #endif -#endif /* INET6 */ *found = TRUE; @@ -938,7 +936,6 @@ try_resolv: if (gbl_resolv_flags.network_name && gbl_resolv_flags.use_external_net_name_resolver) { tp->flags |= TRIED_RESOLVE_ADDRESS; -#ifdef INET6 #ifdef HAVE_C_ARES if ((gbl_resolv_flags.concurrent_dns) && name_resolve_concurrency > 0 && @@ -976,7 +973,6 @@ try_resolv: return tp; } #endif -#endif /* INET6 */ } /* unknown host or DNS timeout */ diff --git a/file.c b/file.c index b83bd27138..e64cd18b7e 100644 --- a/file.c +++ b/file.c @@ -88,7 +88,7 @@ # include #endif -#if defined(_WIN32) && defined(INET6) +#ifdef _WIN32 # include #endif diff --git a/ui/qt/Wireshark.pro b/ui/qt/Wireshark.pro index eeeccea6f8..5a23b2b998 100644 --- a/ui/qt/Wireshark.pro +++ b/ui/qt/Wireshark.pro @@ -388,7 +388,7 @@ win32 { SOURCES += $$SOURCES_WS_C } -DEFINES += INET6 REENTRANT +DEFINES += REENTRANT unix:DEFINES += _U_=\"__attribute__((unused))\" macx:QMAKE_LFLAGS += \ -- cgit v1.2.3