diff options
author | Chris Wilson <chris+github@qwirx.com> | 2011-10-08 12:42:06 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2011-10-08 12:42:06 +0000 |
commit | c002629132df5140732e12f38a199e5f448b5d06 (patch) | |
tree | 773c207cbdc178a2e5b71733270c1764bd6faeaf /lib/common/BoxPlatform.h | |
parent | 22bf0f91ab5a99881556af2085e6027c9766fc8c (diff) |
Recent Cygwin versions of MinGW now define O_BINARY as well, also in
fcntl.h, so include it if we can find it, and only define O_BINARY if
it turns out to be missing.
Diffstat (limited to 'lib/common/BoxPlatform.h')
-rw-r--r-- | lib/common/BoxPlatform.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h index 198d0498..df77c310 100644 --- a/lib/common/BoxPlatform.h +++ b/lib/common/BoxPlatform.h @@ -160,9 +160,11 @@ #endif // 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 +// MSVC 2010 and newer MinGW define this 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 HAVE_FCNTL_H # include <fcntl.h> #endif |