diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-08-21 11:08:44 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-08-21 11:08:44 +0000 |
commit | 22364b1fdcb940f80ece0c78fb2ec72a88b93ad4 (patch) | |
tree | aa180ec8d0d9f65e578736a8f6bf9d1074295c45 /lib | |
parent | e770d8a0143378f56141ead28515e58358607ce5 (diff) |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common/BoxPlatform.h | 13 |
1 files 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 <sys/types.h> + #define __MSVCRT_VERSION__ 0x0601 #endif - // need msvcrt version 6.1 or higher for _gmtime64() - // must define this before importing <sys/types.h> - #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 |