From 60b1b879030c6af777a6675e90e4ea9f34e3eb09 Mon Sep 17 00:00:00 2001 From: Meco Man <34888354+mysterywolf@users.noreply.github.com> Date: Fri, 2 Oct 2020 11:22:17 +0800 Subject: [PATCH] =?UTF-8?q?[fixed]=20=E5=9C=A8keil=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E4=B8=8B=20compilers\armlibc\sys\unistd.h=20=E4=B8=8E=20libc?= =?UTF-8?q?=5Ffcntl.h=E7=9A=84=E5=AE=8F=E5=AE=9A=E4=B9=89=E5=8F=91?= =?UTF-8?q?=E7=94=9F=E4=BA=86=E9=87=8D=E5=A4=8D=E5=AE=9A=E4=B9=89=E7=9A=84?= =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/compilers/armlibc/sys/unistd.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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);