diff options
author | Chris Wilson <chris+github@qwirx.com> | 2011-10-08 12:41:28 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2011-10-08 12:41:28 +0000 |
commit | 22bf0f91ab5a99881556af2085e6027c9766fc8c (patch) | |
tree | 599156529aec8deee7611fbcc407b6eb02b50644 /lib/win32 | |
parent | 7d5a01b3af76ecb46a7f131ce984e7c4265a0d30 (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/win32')
-rw-r--r-- | lib/win32/emu.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/win32/emu.h b/lib/win32/emu.h index 81370a1b..9582b138 100644 --- a/lib/win32/emu.h +++ b/lib/win32/emu.h @@ -15,6 +15,9 @@ #if ! defined EMU_INCLUDE && defined WIN32 #define EMU_INCLUDE +// Need feature detection macros below +#include "../common/BoxConfig.h" + // Shut up stupid new warnings. Thanks MinGW! Ever heard of "compatibility"? #ifdef __MINGW32__ # define __MINGW_FEATURES__ 0 @@ -450,7 +453,7 @@ int console_read(char* pBuffer, size_t BufferSize); // note: chsize() doesn't work over 2GB: // [https://stat.ethz.ch/pipermail/r-devel/2005-May/033339.html] #ifndef HAVE_FTRUNCATE - int ftruncate(int, off_t); + extern "C" int ftruncate(int, off_t); inline int ftruncate(int __fd, off_t __length) { return _chsize(__fd, __length); |