From 7b4cc222164ee6538e460080295b8592703f04f2 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 a1c0576..2aa4d32 100755 --- a/configure.ac +++ b/configure.ac @@ -3285,7 +3285,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...]) @@ -3293,18 +3293,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 aa8185f..fd0ca94 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 d195798..534fba1 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 4144aa7..dedd447 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 8138b26..08f5585 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 e0d5f93..6e8d9e7 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 7439042..eacf16f 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 -- 2.7.4