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

configure.ac
src/lib/eina_hash.c
src/lib/eina_log.c
src/lib/eina_module.c

index 97fb9ed..6f71e0d 100644 (file)
@@ -330,6 +330,7 @@ fi
 AC_HEADER_ASSERT
 AC_HEADER_DIRENT
 AC_HEADER_TIME
+AC_CHECK_HEADERS([unistd.h libgen.h])
 EFL_CHECK_PATH_MAX
 
 ### Checks for types
index 18633e7..38c6a61 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
 #ifdef _MSC_VER
 # include <Evil.h>
-#else
-# include <stdint.h>
 #endif
 
 #include "eina_config.h"
index 33c021d..4093b55 100644 (file)
 #include <assert.h>
 #include <errno.h>
 
-#ifndef _MSC_VER
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
 
index 1c6d70f..203fe7a 100644 (file)
@@ -42,10 +42,8 @@ void *alloca (size_t);
 #include <dirent.h>
 #include <string.h>
 
-#ifndef _MSC_VER
+#ifdef HAVE_LIBGEN_H
 # include <libgen.h>
-#else
-# include <Evil.h>
 #endif
 
 #include <dlfcn.h>