From 4a62f40e8be40bc0dd23a10f1c6ea00f4cf818f3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 26 Mar 2011 23:24:13 +0000 Subject: Avoid conflicting declarations of O_BINARY on MSVC compiles. --- lib/common/BoxPlatform.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h index 617aa031..198d0498 100644 --- a/lib/common/BoxPlatform.h +++ b/lib/common/BoxPlatform.h @@ -159,7 +159,13 @@ #define INFTIM -1 #endif -// for Unix compatibility with Windows :-) +// Define O_BINARY for Unix compatibility with Windows :-) +// MSVC 2010 defines in in fcntl.h, which is probably not included by this +// point, so include it now so that we can detect if we need O_BINARY +#ifdef _MSC_VER +# include +#endif + #ifndef O_BINARY #define O_BINARY 0 #endif -- cgit v1.2.3