From 4d11d31e3d9058d96064eacb197f5eec8f7cb603 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Sat, 20 Feb 2010 19:12:52 +0000 Subject: [PATCH] * instead of including headers wrt to the OS, include them if they are available * compilation on Windows XP minimum only SVN revision: 46338 --- legacy/ecore/configure.ac | 8 +++++-- legacy/ecore/src/lib/ecore_con/ecore_con.c | 21 ++++++++++++++----- .../ecore/src/lib/ecore_con/ecore_con_local.c | 13 ++++++++---- .../ecore/src/lib/ecore_con/ecore_con_ssl.c | 2 +- .../ecore/src/lib/ecore_con/ecore_con_url.c | 2 +- 5 files changed, 33 insertions(+), 13 deletions(-) diff --git a/legacy/ecore/configure.ac b/legacy/ecore/configure.ac index 814c92b88d..6bc5841522 100644 --- a/legacy/ecore/configure.ac +++ b/legacy/ecore/configure.ac @@ -864,10 +864,14 @@ case "$host_os" in AC_DEFINE(HAVE_SYS_TIME_H, 1, [Define to 1 if you have the header file.]) ;; *) - AC_CHECK_HEADERS([dlfcn.h features.h langinfo.h locale.h netdb.h netinet/in.h sys/time.h sys/mman.h signal.h sys/resource.h]) + AC_CHECK_HEADERS([dlfcn.h features.h langinfo.h locale.h netdb.h sys/time.h sys/mman.h signal.h sys/resource.h]) ;; esac +# ecore_con + +AC_CHECK_HEADERS([arpa/inet.h netinet/tcp.h netinet/in.h sys/socket.h sys/un.h ws2tcpip.h]) + # Framebuffer (ecore_fb) have_fb="no" AC_CHECK_HEADER([linux/fb.h], @@ -921,7 +925,7 @@ case "$host_os" in WIN32_CFLAGS="-mwin32" ;; mingw*) - WIN32_CPPFLAGS="-D_WIN32_WINNT=0x0500" + WIN32_CPPFLAGS="-D_WIN32_WINNT=0x0501" ;; esac AC_SUBST(WIN32_CPPFLAGS) diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con.c b/legacy/ecore/src/lib/ecore_con/ecore_con.c index 6ac52ea574..c331c3d370 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con.c +++ b/legacy/ecore/src/lib/ecore_con/ecore_con.c @@ -14,19 +14,30 @@ #include #include -#ifndef _WIN32 +#ifdef HAVE_ARPA_INET_H # include +#endif + +#ifdef HAVE_NETINET_TCP_H # include -# include -# include -#else -# include #endif #ifdef HAVE_NETINET_IN_H # include #endif +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + +#ifdef HAVE_SYS_UN_H +# include +#endif + +#ifdef HAVE_WS2TCPIP_H +# include +#endif + #ifdef HAVE_EVIL # include #endif diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_local.c b/legacy/ecore/src/lib/ecore_con/ecore_con_local.c index 59f654fa9a..371efcb8da 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con_local.c +++ b/legacy/ecore/src/lib/ecore_con/ecore_con_local.c @@ -13,10 +13,15 @@ #include #include -#ifndef _WIN32 -#include -#include -#else +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + +#ifdef HAVE_SYS_UN_H +# include +#endif + +#ifdef HAVE_WS2TCPIP_H # include #endif diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_ssl.c b/legacy/ecore/src/lib/ecore_con/ecore_con_ssl.c index fcb9896161..6be7214c5c 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con_ssl.c +++ b/legacy/ecore/src/lib/ecore_con/ecore_con_ssl.c @@ -12,7 +12,7 @@ # include #endif -#ifdef _WIN32 +#ifdef HAVE_WS2TCPIP_H # include #endif diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_url.c b/legacy/ecore/src/lib/ecore_con/ecore_con_url.c index d943477681..c023bd74fa 100644 --- a/legacy/ecore/src/lib/ecore_con/ecore_con_url.c +++ b/legacy/ecore/src/lib/ecore_con/ecore_con_url.c @@ -54,7 +54,7 @@ #include #include -#ifdef _WIN32 +#ifdef HAVE_WS2TCPIP_H # include #endif