From b41ed254a9f9dce60eb505f75da30a25fb6ea424 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Tue, 2 Apr 2019 10:09:24 -0400 Subject: [PATCH] remove useless check of ws2tcpip.h Summary: it is useless to check for header files which necessarly exist Test Plan: compilation Reviewers: raster, cedric, zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8535 --- configure.ac | 21 +++++++++++---------- header_checks/meson.build | 1 - src/lib/ecore_con/ecore_con.c | 5 +---- src/lib/ecore_con/ecore_con_local.c | 2 +- src/lib/ecore_con/ecore_con_socks.c | 5 +---- src/lib/ecore_con/ecore_con_url_curl.c | 2 +- src/lib/ecore_con/meson.build | 5 +---- 7 files changed, 16 insertions(+), 25 deletions(-) diff --git a/configure.ac b/configure.ac index 01abaefedd..0adee07f76 100644 --- a/configure.ac +++ b/configure.ac @@ -3258,7 +3258,7 @@ EFL_EVAL_PKGS([ECORE_CON]) ### Checks for header files -AC_CHECK_HEADERS([ws2tcpip.h netdb.h sys/filio.h]) +AC_CHECK_HEADERS([netdb.h sys/filio.h]) if test "x${ac_cv_header_netdb_h}" = "xno" && test "x${have_windows}" = "xno"; then AC_MSG_ERROR([netdb.h is requested to have Ecore_Con. Exiting...]) @@ -3266,18 +3266,19 @@ fi ### Checks for types -have_ipv6="no" -AC_CHECK_TYPES([struct ipv6_mreq], - [have_ipv6="yes"], - [have_ipv6="no"], - [[ +if test "x${have_win32}" = "xyes" ; then + have_ipv6="yes" +else + have_ipv6="no" + AC_CHECK_TYPES([struct ipv6_mreq], + [have_ipv6="yes"], + [have_ipv6="no"], + [[ #ifdef HAVE_NETINET_IN_H # include #endif -#ifdef HAVE_WS2TCPIP_H -# include -#endif -]]) + ]]) +fi AC_DEFINE_IF([HAVE_IPV6], [test "x${have_ipv6}" = "xyes"], diff --git a/header_checks/meson.build b/header_checks/meson.build index 48eeb89d2a..42d638fc6a 100644 --- a/header_checks/meson.build +++ b/header_checks/meson.build @@ -52,7 +52,6 @@ header_checks = [ 'langinfo.h', 'locale.h', 'uv.h', - 'ws2tcpip.h', 'crt_externs.h' ] diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c index 7c6e93e62f..a781025d7b 100644 --- a/src/lib/ecore_con/ecore_con.c +++ b/src/lib/ecore_con/ecore_con.c @@ -38,11 +38,8 @@ # include #endif -#ifdef HAVE_WS2TCPIP_H -# include -#endif - #ifdef _WIN32 +# include # include #endif diff --git a/src/lib/ecore_con/ecore_con_local.c b/src/lib/ecore_con/ecore_con_local.c index e91819ec42..5fed0b711e 100644 --- a/src/lib/ecore_con/ecore_con_local.c +++ b/src/lib/ecore_con/ecore_con_local.c @@ -17,7 +17,7 @@ # include #endif -#ifdef HAVE_WS2TCPIP_H +#ifdef _WIN32 # include #endif diff --git a/src/lib/ecore_con/ecore_con_socks.c b/src/lib/ecore_con/ecore_con_socks.c index 8138b26525..08f5585381 100644 --- a/src/lib/ecore_con/ecore_con_socks.c +++ b/src/lib/ecore_con/ecore_con_socks.c @@ -34,11 +34,8 @@ # include #endif -#ifdef HAVE_WS2TCPIP_H -# include -#endif - #ifdef _WIN32 +# include # include #endif diff --git a/src/lib/ecore_con/ecore_con_url_curl.c b/src/lib/ecore_con/ecore_con_url_curl.c index e0d5f93c6b..6e8d9e73c3 100644 --- a/src/lib/ecore_con/ecore_con_url_curl.c +++ b/src/lib/ecore_con/ecore_con_url_curl.c @@ -8,7 +8,7 @@ #include #include -#ifdef HAVE_WS2TCPIP_H +#ifdef _WIN32 # include #endif diff --git a/src/lib/ecore_con/meson.build b/src/lib/ecore_con/meson.build index 743904285c..eacf16f720 100644 --- a/src/lib/ecore_con/meson.build +++ b/src/lib/ecore_con/meson.build @@ -2,10 +2,7 @@ ecore_con_deps = [] ecore_con_pub_deps = [eina, eo, efl, ecore] if sys_windows == true - ipv6 = cc.compiles(''' - #include - struct ipv6_mreq tmp; - ''') + ipv6 = true else ipv6 = cc.compiles(''' #include