From: Victor Julien Date: Thu, 15 Nov 2012 15:02:18 +0000 (+0100) Subject: build: more cygwin cleanups X-Git-Tag: suricata-1.4rc1~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b63c2eda6a356413bfc673116fc4de45642e2543;p=thirdparty%2Fsuricata.git build: more cygwin cleanups --- diff --git a/configure.ac b/configure.ac index e2777a72fb..1661b88866 100644 --- a/configure.ac +++ b/configure.ac @@ -99,7 +99,7 @@ AC_INIT(configure.ac) AC_CHECK_HEADERS([limits.h netdb.h netinet/in.h poll.h sched.h signal.h]) AC_CHECK_HEADERS([stdarg.h stdint.h stdio.h stdlib.h string.h sys/ioctl.h]) AC_CHECK_HEADERS([syslog.h sys/prctl.h sys/socket.h sys/stat.h sys/syscall.h]) - AC_CHECK_HEADERS([sys/time.h time.h unistd.h windows.h winsock2.h ws2tcpip.h]) + AC_CHECK_HEADERS([sys/time.h time.h unistd.h]) AC_CHECK_HEADERS([sys/ioctl.h linux/if_ether.h linux/if_packet.h linux/filter.h]) AC_CHECK_HEADERS([sys/socket.h net/if.h sys/mman.h linux/if_arp.h], [], [], @@ -109,6 +109,13 @@ AC_INIT(configure.ac) #endif ]]) + AC_CHECK_HEADERS([windows.h winsock2.h ws2tcpip.h], [], [], + [[#define _X86_ + ]]) + AC_CHECK_HEADERS([w32api/winbase.h], [], [], + [[#define _X86_ + #include + ]]) # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE diff --git a/src/suricata-common.h b/src/suricata-common.h index 418f960fdf..b36c489062 100644 --- a/src/suricata-common.h +++ b/src/suricata-common.h @@ -171,6 +171,12 @@ #include #endif +#if __CYGWIN__ +#if !defined _X86_ && !defined __x86_64 +#define _X86_ +#endif +#endif + #ifdef HAVE_WINDOWS_H #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 @@ -178,13 +184,18 @@ #include #endif +#ifdef HAVE_W32API_WINBASE_H +#include +#endif + +#if !__CYGWIN__ #ifdef HAVE_WINSOCK2_H #include #endif - #ifdef HAVE_WS2TCPIP_H #include #endif +#endif /* !__CYGWIN__ */ #ifdef HAVE_ASSERT_H #include