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

configure.ac
src/lib/eet_cipher.c
src/lib/eet_lib.c

index 6531006..95eb99d 100644 (file)
@@ -352,7 +352,7 @@ AC_CHECK_HEADER([jpeglib.h],
    [dummy="yes"],
    [AC_MSG_ERROR("Cannot find jpeglib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")])
 
-AC_CHECK_HEADERS(netinet/in.h)
+AC_CHECK_HEADERS([netinet/in.h unistd.h])
 EFL_CHECK_PATH_MAX
 
 ### Checks for types
index 6eff8de..8c892d8 100644 (file)
@@ -25,9 +25,9 @@ void *    alloca (size_t);
 #include <sys/stat.h>
 #include <sys/mman.h>
 
-#ifndef _MSC_VER
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
-#endif /* ifndef _MSC_VER */
+#endif
 
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>
index d67c5e8..cd1019c 100644 (file)
@@ -34,9 +34,9 @@ void *    alloca (size_t);
 #include <fcntl.h>
 #include <zlib.h>
 
-#ifndef _MSC_VER
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
-#endif /* ifndef _MSC_VER */
+#endif
 
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>