From 5a351ab3dada19c20e0544f1d8ce5977eb8cf138 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 26 Jan 2008 05:50:09 +0000 Subject: [PATCH] replace some win32 ifdef hacks with autoconf checks SVN revision: 33617 --- legacy/eet/configure.in | 2 +- legacy/eet/src/lib/Eet_private.h | 5 +++-- legacy/eet/src/lib/eet_lib.c | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/legacy/eet/configure.in b/legacy/eet/configure.in index 7117ff6b4c..c615b0f394 100644 --- a/legacy/eet/configure.in +++ b/legacy/eet/configure.in @@ -33,7 +33,7 @@ AC_FUNC_ALLOCA AC_CHECK_HEADER(zlib.h,, AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file")) AC_CHECK_HEADER(jpeglib.h,, 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_ONCE(netinet/in.h sys/mman.h windows.h winsock2.h) winsock_libs="" create_shared_lib="" diff --git a/legacy/eet/src/lib/Eet_private.h b/legacy/eet/src/lib/Eet_private.h index 35591139a6..044ba83405 100644 --- a/legacy/eet/src/lib/Eet_private.h +++ b/legacy/eet/src/lib/Eet_private.h @@ -1,7 +1,7 @@ #ifndef _EET_PRIVATE_H #define _EET_PRIVATE_H -#include "config.h" +#include #include #include @@ -32,7 +32,8 @@ void *alloca (size_t); #ifdef HAVE_NETINET_IN_H # include -#elif _WIN32 +#endif +#ifdef HAVE_WINSOCK2_H # include #endif diff --git a/legacy/eet/src/lib/eet_lib.c b/legacy/eet/src/lib/eet_lib.c index 51642bad9f..d226abb068 100644 --- a/legacy/eet/src/lib/eet_lib.c +++ b/legacy/eet/src/lib/eet_lib.c @@ -2,9 +2,10 @@ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2 */ +#include #include -#ifndef _WIN32 -#include +#ifdef HAVE_SYS_MMAN_H +# include #endif #include "Eet.h"