From 75cfda4cd1fe057f0557bd86963a71e530edd584 Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Thu, 28 Jan 2010 21:05:09 +0000 Subject: ARM semihosting: win32 and cygwin fixes Cygwin would fail to reopen a previously written file if the mode is not given. Simplified converting the open flags and made sure the win32 O_BINARY bit is set. Added define for systems that do not support O_BINARY. Signed-off-by: Spencer Oliver --- src/helper/replacements.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/helper/replacements.h') diff --git a/src/helper/replacements.h b/src/helper/replacements.h index 2b3ea73a..3598dd9f 100644 --- a/src/helper/replacements.h +++ b/src/helper/replacements.h @@ -40,6 +40,12 @@ #define ENOTSUP 134 /* Not supported */ #endif +/* for systems that do not support O_BINARY + * linux being one of them */ +#ifndef O_BINARY +#define O_BINARY 0 +#endif + #ifndef HAVE_SYS_TIME_H #ifndef _TIMEVAL_DEFINED -- cgit v1.2.3