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 <ntfreak@users.sourceforge.net>
This commit is contained in:
Spencer Oliver
2010-01-28 21:05:09 +00:00
parent 465a06dfdc
commit 75cfda4cd1
2 changed files with 32 additions and 16 deletions

View File

@@ -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