* instead of including headers wrt to the OS, include them if
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 20 Feb 2010 19:12:52 +0000 (19:12 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 20 Feb 2010 19:12:52 +0000 (19:12 +0000)
   they are available
 * compilation on Windows XP minimum only

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@46338 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.ac
src/lib/ecore_con/ecore_con.c
src/lib/ecore_con/ecore_con_local.c
src/lib/ecore_con/ecore_con_ssl.c
src/lib/ecore_con/ecore_con_url.c

index 814c92b..6bc5841 100644 (file)
@@ -864,10 +864,14 @@ case "$host_os" in
       AC_DEFINE(HAVE_SYS_TIME_H, 1, [Define to 1 if you have the <sys/time.h> 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)
index 6ac52ea..c331c3d 100644 (file)
 #include <unistd.h>
 #include <fcntl.h>
 
-#ifndef _WIN32
+#ifdef HAVE_ARPA_INET_H
 # include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_NETINET_TCP_H
 # include <netinet/tcp.h>
-# include <sys/socket.h>
-# include <sys/un.h>
-#else
-# include <ws2tcpip.h>
 #endif
 
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>
 #endif
 
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#ifdef HAVE_SYS_UN_H
+# include <sys/un.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
+# include <ws2tcpip.h>
+#endif
+
 #ifdef HAVE_EVIL
 # include <Evil.h>
 #endif
index 59f654f..371efcb 100644 (file)
 #include <fcntl.h>
 #include <sys/stat.h>
 
-#ifndef _WIN32
-#include <sys/socket.h>
-#include <sys/un.h>
-#else
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#ifdef HAVE_SYS_UN_H
+# include <sys/un.h>
+#endif
+
+#ifdef HAVE_WS2TCPIP_H
 # include <ws2tcpip.h>
 #endif
 
index fcb9896..6be7214 100644 (file)
@@ -12,7 +12,7 @@
 # include <openssl/ssl.h>
 #endif
 
-#ifdef _WIN32
+#ifdef HAVE_WS2TCPIP_H
 # include <ws2tcpip.h>
 #endif
 
index d943477..c023bd7 100644 (file)
@@ -54,7 +54,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#ifdef _WIN32
+#ifdef HAVE_WS2TCPIP_H
 # include <ws2tcpip.h>
 #endif