diff options
| author | Bernard Xiong <[email protected]> | 2021-09-27 14:14:42 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-27 14:14:42 +0800 |
| commit | c6a40b77c8f17f76cf6cb3d2c80c6271363d2351 (patch) | |
| tree | 49a64f522c6c036a2bdb1127b113067fd451808d /components/libc/compilers | |
| parent | 4a9ecd8d0d3cf4bfbbd05ab76829879aa0b6423d (diff) | |
| parent | 7d57f6b17580c60f8b1bebdde22450a7fce570ec (diff) | |
Merge pull request #5098 from mysterywolf/simulator
[bsp][simulator] 消除大部分编译错误
Diffstat (limited to 'components/libc/compilers')
| -rw-r--r-- | components/libc/compilers/common/fcntl.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/components/libc/compilers/common/fcntl.h b/components/libc/compilers/common/fcntl.h index b98f540627..3460926708 100644 --- a/components/libc/compilers/common/fcntl.h +++ b/components/libc/compilers/common/fcntl.h @@ -12,13 +12,10 @@ #include <sys/types.h> -#if defined(_WIN32) -#define O_ACCMODE (_O_RDONLY | _O_WRONLY | _O_RDWR) -#endif - -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 +#define O_RDONLY 0x0000 /* open for reading only */ +#define O_WRONLY 0x0001 /* open for writing only */ +#define O_RDWR 0x0002 /* open for reading and writing */ +#define O_ACCMODE 0x0003 /* mask for above modes */ #define O_CREAT 0100 #define O_EXCL 0200 @@ -43,8 +40,6 @@ #define O_SEARCH O_PATH #define O_EXEC O_PATH -#define O_ACCMODE (03|O_SEARCH) - #define F_DUPFD 0 #define F_GETFD 1 #define F_SETFD 2 |
