[libc] 优化fcntl.h定义
This commit is contained in:
parent
f944ea7690
commit
d60c968902
|
@ -12,13 +12,10 @@
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#define O_RDONLY 0x0000 /* open for reading only */
|
||||||
#define O_ACCMODE (_O_RDONLY | _O_WRONLY | _O_RDWR)
|
#define O_WRONLY 0x0001 /* open for writing only */
|
||||||
#endif
|
#define O_RDWR 0x0002 /* open for reading and writing */
|
||||||
|
#define O_ACCMODE 0x0003 /* mask for above modes */
|
||||||
#define O_RDONLY 00
|
|
||||||
#define O_WRONLY 01
|
|
||||||
#define O_RDWR 02
|
|
||||||
|
|
||||||
#define O_CREAT 0100
|
#define O_CREAT 0100
|
||||||
#define O_EXCL 0200
|
#define O_EXCL 0200
|
||||||
|
@ -43,8 +40,6 @@
|
||||||
#define O_SEARCH O_PATH
|
#define O_SEARCH O_PATH
|
||||||
#define O_EXEC O_PATH
|
#define O_EXEC O_PATH
|
||||||
|
|
||||||
#define O_ACCMODE (03|O_SEARCH)
|
|
||||||
|
|
||||||
#define F_DUPFD 0
|
#define F_DUPFD 0
|
||||||
#define F_GETFD 1
|
#define F_GETFD 1
|
||||||
#define F_SETFD 2
|
#define F_SETFD 2
|
||||||
|
|
Loading…
Reference in New Issue