浏览代码

[libc] Add O_BINARY definition

Bernard Xiong 7 年之前
父节点
当前提交
484b667d7d
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      include/libc/libc_fcntl.h

+ 9 - 0
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