diff options
author | Chris Wilson <chris+github@qwirx.com> | 2011-03-26 23:24:13 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2011-03-26 23:24:13 +0000 |
commit | 4a62f40e8be40bc0dd23a10f1c6ea00f4cf818f3 (patch) | |
tree | f55329bb33b26e1f4f8593eab572ea1693a23510 /lib/common/BoxPlatform.h | |
parent | cd00e66867bb9aa9cd473dce22e808a95b0a59e8 (diff) |
Avoid conflicting declarations of O_BINARY on MSVC compiles.
Diffstat (limited to 'lib/common/BoxPlatform.h')
-rw-r--r-- | lib/common/BoxPlatform.h | 8 |
1 files changed, 7 insertions, 1 deletions
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 <fcntl.h> +#endif + #ifndef O_BINARY #define O_BINARY 0 #endif |