* instead of including headers wrt to the OS, include them if

they are available
 * compilation on Windows XP minimum only

SVN revision: 46338
This commit is contained in:
Vincent Torri 2010-02-20 19:12:52 +00:00
parent 3499767ddb
commit 4d11d31e3d
5 changed files with 33 additions and 13 deletions

View 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)

View File

@ -14,19 +14,30 @@
#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

View File

@ -13,10 +13,15 @@
#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

View File

@ -12,7 +12,7 @@
# include <openssl/ssl.h>
#endif
#ifdef _WIN32
#ifdef HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
#endif

View File

@ -54,7 +54,7 @@
#include <sys/types.h>
#include <unistd.h>
#ifdef _WIN32
#ifdef HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
#endif