summaryrefslogtreecommitdiff
path: root/include/libc
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-02-09 09:30:32 +0800
committerBernard Xiong <[email protected]>2018-02-09 09:30:32 +0800
commit484b667d7dd1c88c00892716918875dc7c3790a9 (patch)
tree6a68769d73606061104d5e0fd972cc117109f881 /include/libc
parent84a44e58ddcd57d12c3a1dcbff17ff9d96b2cd41 (diff)
[libc] Add O_BINARY definition
Diffstat (limited to 'include/libc')
-rw-r--r--include/libc/libc_fcntl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/libc/libc_fcntl.h b/include/libc/libc_fcntl.h
index 86774a5630..7c5a075a97 100644
--- a/include/libc/libc_fcntl.h
+++ b/include/libc/libc_fcntl.h
@@ -20,6 +20,7 @@
* Change Logs:
* Date Author Notes
* 2018-02-07 Bernard Add O_DIRECTORY definition in NEWLIB mode.
+ * 2018-02-09 Bernard Add O_BINARY definition
*/
#ifndef LIBC_FCNTL_H__
@@ -47,6 +48,14 @@
#define O_DIRECTORY 0x200000
#endif
+#ifndef O_BINARY
+#ifdef _O_BINARY
+#define O_BINARY _O_BINARY
+#else
+#define O_BINARY 0
+#endif
+#endif
+
#else
#define O_RDONLY 00
#define O_WRONLY 01