From 435a6b06cd89561fcd2cb7c7f067ba44e49b8453 Mon Sep 17 00:00:00 2001 From: caro Date: Fri, 7 Jan 2011 08:51:17 +0000 Subject: [PATCH] use configure-time headers checks instead of compiler ones git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@55975 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- configure.ac | 2 +- src/lib/ecore/ecore.c | 3 ++- src/lib/ecore/ecore_app.c | 6 ++++-- src/lib/ecore/ecore_main.c | 17 +++++++++++------ src/lib/ecore_file/ecore_file.c | 6 +++++- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index df8d9a9..f4cc314 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index ff17209..9a1c30c 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -8,7 +8,7 @@ #include #include -#ifndef _MSC_VER +#ifdef HAVE_UNISTD_H # include #endif @@ -27,6 +27,7 @@ #ifdef HAVE_EVIL # include #endif + #include #include "Ecore.h" diff --git a/src/lib/ecore/ecore_app.c b/src/lib/ecore/ecore_app.c index fe47d81..9ee05b1 100644 --- a/src/lib/ecore/ecore_app.c +++ b/src/lib/ecore/ecore_app.c @@ -4,9 +4,11 @@ #include -#ifndef _MSC_VER +#ifdef HAVE_UNISTD_H # include -#else +#endif + +#ifdef _MSC_VER # include #endif diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 479beb5..b268612 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -23,17 +23,22 @@ #include #include -#ifndef _MSC_VER +#ifdef HAVE_SYS_TIME_H # include +#endif + +#ifdef HAVE_UNISTD_H # include -#else +#endif + +#ifdef _MSC_VER # include #endif #define FIX_HZ 1 #ifdef FIX_HZ -# ifndef _MSC_VER +# ifdef HAVE_SYS_PARAM_H # include # endif # ifndef HZ @@ -45,9 +50,6 @@ # include #endif -#include "Ecore.h" -#include "ecore_private.h" - #ifdef HAVE_SYS_EPOLL_H # define HAVE_EPOLL # include @@ -57,6 +59,9 @@ # include #endif +#include "Ecore.h" +#include "ecore_private.h" + struct _Ecore_Fd_Handler { EINA_INLIST; diff --git a/src/lib/ecore_file/ecore_file.c b/src/lib/ecore_file/ecore_file.c index 7fff284..82c1aa2 100644 --- a/src/lib/ecore_file/ecore_file.c +++ b/src/lib/ecore_file/ecore_file.c @@ -5,14 +5,18 @@ #include #include -#ifndef _MSC_VER +#ifdef HAVE_UNISTD_H # include +#endif + +#ifdef HAVE_LIBGEN_H # include #endif #ifdef HAVE_FEATURES_H # include #endif + #include #include -- 2.7.4