diff options
author | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-01-28 21:05:09 +0000 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-01-28 21:05:09 +0000 |
commit | 75cfda4cd1fe057f0557bd86963a71e530edd584 (patch) | |
tree | df0ddeae48ab68e14ae60c7c67fb9c23b9294299 /src/helper | |
parent | 465a06dfdc6c5d4af377dac7b9d71845cb0dc034 (diff) | |
download | openocd+libswd-75cfda4cd1fe057f0557bd86963a71e530edd584.tar.gz openocd+libswd-75cfda4cd1fe057f0557bd86963a71e530edd584.tar.bz2 openocd+libswd-75cfda4cd1fe057f0557bd86963a71e530edd584.tar.xz openocd+libswd-75cfda4cd1fe057f0557bd86963a71e530edd584.zip |
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>
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/replacements.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |