use configure-time headers checks instead of compiler ones
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 7 Jan 2011 08:51:17 +0000 (08:51 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 7 Jan 2011 08:51:17 +0000 (08:51 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@55975 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.ac
src/lib/ecore/ecore.c
src/lib/ecore/ecore_app.c
src/lib/ecore/ecore_main.c
src/lib/ecore_file/ecore_file.c

index df8d9a9..f4cc314 100644 (file)
@@ -889,7 +889,7 @@ case "$host_os" in
       have_addrinfo="yes"
       ;;
    *)
-      AC_CHECK_HEADERS([dlfcn.h features.h langinfo.h locale.h sys/time.h sys/mman.h signal.h sys/resource.h])
+      AC_CHECK_HEADERS([dlfcn.h features.h langinfo.h locale.h sys/time.h sys/mman.h signal.h sys/resource.h sys/param.h unistd.h libgen])
       ;;
 esac
 
index ff17209..9a1c30c 100644 (file)
@@ -8,7 +8,7 @@
 #include <fcntl.h>
 #include <errno.h>
 
-#ifndef _MSC_VER
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
 
@@ -27,6 +27,7 @@
 #ifdef HAVE_EVIL
 # include <Evil.h>
 #endif
+
 #include <Eina.h>
 
 #include "Ecore.h"
index fe47d81..9ee05b1 100644 (file)
@@ -4,9 +4,11 @@
 
 #include <stdlib.h>
 
-#ifndef _MSC_VER
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
-#else
+#endif
+
+#ifdef _MSC_VER
 # include <process.h>
 #endif
 
index 479beb5..b268612 100644 (file)
 #include <errno.h>
 #include <fcntl.h>
 
-#ifndef _MSC_VER
+#ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
-#else
+#endif
+
+#ifdef _MSC_VER
 # include <float.h>
 #endif
 
 #define FIX_HZ 1
 
 #ifdef FIX_HZ
-# ifndef _MSC_VER
+# ifdef HAVE_SYS_PARAM_H
 #  include <sys/param.h>
 # endif
 # ifndef HZ
@@ -45,9 +50,6 @@
 # include <Evil.h>
 #endif
 
-#include "Ecore.h"
-#include "ecore_private.h"
-
 #ifdef HAVE_SYS_EPOLL_H
 # define HAVE_EPOLL
 # include <sys/epoll.h>
@@ -57,6 +59,9 @@
 # include <glib.h>
 #endif
 
+#include "Ecore.h"
+#include "ecore_private.h"
+
 struct _Ecore_Fd_Handler
 {
    EINA_INLIST;
index 7fff284..82c1aa2 100644 (file)
@@ -5,14 +5,18 @@
 #include <stdio.h>
 #include <string.h>
 
-#ifndef _MSC_VER
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
+#endif
+
+#ifdef HAVE_LIBGEN_H
 # include <libgen.h>
 #endif
 
 #ifdef HAVE_FEATURES_H
 # include <features.h>
 #endif
+
 #include <ctype.h>
 #include <errno.h>