From 22364b1fdcb940f80ece0c78fb2ec72a88b93ad4 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 21 Aug 2008 11:08:44 +0000 Subject: Better handle the case where __MSVCRT_VERSION__ is already defined (e.g. by wxWidgets) before including Box.h, as long as the defined version is high enough, to avoid mutual incompatibility with wxWidgets (needed for Boxi). Define O_BINARY if it's not already defined rather than using configury. --- lib/common/BoxPlatform.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h index 92088414..3af893b7 100644 --- a/lib/common/BoxPlatform.h +++ b/lib/common/BoxPlatform.h @@ -30,11 +30,14 @@ #ifdef WIN32 #ifdef __MSVCRT_VERSION__ - #error Must include Box.h before sys/types.h + #if __MSVCRT_VERSION__ < 0x0601 + #error Must include Box.h before sys/types.h + #endif + #else + // need msvcrt version 6.1 or higher for _gmtime64() + // must define this before importing + #define __MSVCRT_VERSION__ 0x0601 #endif - // need msvcrt version 6.1 or higher for _gmtime64() - // must define this before importing - #define __MSVCRT_VERSION__ 0x0601 #endif #ifdef HAVE_SYS_TYPES_H @@ -153,7 +156,7 @@ #endif // for Unix compatibility with Windows :-) -#if !HAVE_DECL_O_BINARY +#ifndef O_BINARY #define O_BINARY 0 #endif -- cgit v1.2.3