Skip to content

Commit 4515c21

Browse files
authored
Merge pull request #3942 from mysterywolf/unsitd
[fixed] 在keil环境下 compilers\armlibc\sys\unistd.h 与 libc_fcntl.h的宏定义发生了…
2 parents a5cd7e7 + 60b1b87 commit 4515c21

File tree

1 file changed

+18
-0
lines changed
  • components/libc/compilers/armlibc/sys

1 file changed

+18
-0
lines changed

components/libc/compilers/armlibc/sys/unistd.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,34 @@
3636
#define _FNDELAY _FNONBLOCK /* non blocking I/O (4.2 style) */
3737
#define _FNOCTTY 0x8000 /* don't assign a ctty on this open */
3838

39+
40+
#ifndef O_RDONLY
3941
#define O_RDONLY 0 /* +1 == FREAD */
42+
#endif
43+
#ifndef O_WRONLY
4044
#define O_WRONLY 1 /* +1 == FWRITE */
45+
#endif
46+
#ifndef O_RDWR
4147
#define O_RDWR 2 /* +1 == FREAD|FWRITE */
48+
#endif
49+
#ifndef O_APPEND
4250
#define O_APPEND _FAPPEND
51+
#endif
52+
#ifndef O_CREAT
4353
#define O_CREAT _FCREAT
54+
#endif
55+
#ifndef O_TRUNC
4456
#define O_TRUNC _FTRUNC
57+
#endif
58+
#ifndef O_EXCL
4559
#define O_EXCL _FEXCL
60+
#endif
61+
#ifndef O_SYNC
4662
#define O_SYNC _FSYNC
4763
#endif
4864

65+
#endif
66+
4967

5068
int isatty (int fd);
5169
char * ttyname (int desc);

0 commit comments

Comments
 (0)