add O_PATH/O_SEARCH support to fcntl.h

I'm not 100% sure that Linux's O_PATH meets the POSIX requirements for
O_SEARCH, but it seems very close if not perfect. and old kernels
ignore it, so O_SEARCH will still work as desired as long as the
caller has read permissions to the directory.
This commit is contained in:
Rich Felker
2012-09-13 20:56:25 -04:00
parent cfc09b1ecf
commit b238b37a0f
5 changed files with 9 additions and 1 deletions

View File

@@ -10,12 +10,14 @@
#define O_DIRECTORY 040000
#define O_NOFOLLOW 0100000
#define O_CLOEXEC 02000000
#define O_SEARCH 010000000
#define O_ASYNC 020000
#define O_DIRECT 0200000
#define O_LARGEFILE 0400000
#define O_NOATIME 01000000
#define O_NDELAY O_NONBLOCK
#define O_PATH 010000000
#define F_DUPFD 0
#define F_GETFD 1