summaryrefslogtreecommitdiff
path: root/components/libc
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-10-11 09:39:13 +0800
committerGitHub <[email protected]>2020-10-11 09:39:13 +0800
commit4515c21d29ad3c4c569a568bb03be26bcb8397f9 (patch)
treea49551a4fb56b5f13ffd8a9e53452e935333a615 /components/libc
parenta5cd7e7abd60e166b991375fcec686b44b818a11 (diff)
parent60b1b879030c6af777a6675e90e4ea9f34e3eb09 (diff)
Merge pull request #3942 from mysterywolf/unsitd
[fixed] 在keil环境下 compilers\armlibc\sys\unistd.h 与 libc_fcntl.h的宏定义发生了…
Diffstat (limited to 'components/libc')
-rw-r--r--components/libc/compilers/armlibc/sys/unistd.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/components/libc/compilers/armlibc/sys/unistd.h b/components/libc/compilers/armlibc/sys/unistd.h
index 3199b01e0e..524de2cf83 100644
--- a/components/libc/compilers/armlibc/sys/unistd.h
+++ b/components/libc/compilers/armlibc/sys/unistd.h
@@ -36,16 +36,34 @@
#define _FNDELAY _FNONBLOCK /* non blocking I/O (4.2 style) */
#define _FNOCTTY 0x8000 /* don't assign a ctty on this open */
+
+#ifndef O_RDONLY
#define O_RDONLY 0 /* +1 == FREAD */
+#endif
+#ifndef O_WRONLY
#define O_WRONLY 1 /* +1 == FWRITE */
+#endif
+#ifndef O_RDWR
#define O_RDWR 2 /* +1 == FREAD|FWRITE */
+#endif
+#ifndef O_APPEND
#define O_APPEND _FAPPEND
+#endif
+#ifndef O_CREAT
#define O_CREAT _FCREAT
+#endif
+#ifndef O_TRUNC
#define O_TRUNC _FTRUNC
+#endif
+#ifndef O_EXCL
#define O_EXCL _FEXCL
+#endif
+#ifndef O_SYNC
#define O_SYNC _FSYNC
#endif
+#endif
+
int isatty (int fd);
char * ttyname (int desc);