OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The Native Client Authors. All rights reserved. | 2 * Copyright 2015 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #ifndef GLIBCEMU_SYS_FCNTL_H | 7 #ifndef GLIBCEMU_SYS_FCNTL_H |
8 #define GLIBCEMU_SYS_FCNTL_H 1 | 8 #define GLIBCEMU_SYS_FCNTL_H 1 |
9 | 9 |
10 #include_next <sys/fcntl.h> | 10 #include_next <sys/fcntl.h> |
11 | 11 |
12 #include <sys/cdefs.h> | 12 #include <sys/cdefs.h> |
13 #include <sys/types.h> | 13 #include <sys/types.h> |
14 | 14 |
15 __BEGIN_DECLS | 15 __BEGIN_DECLS |
16 | 16 |
17 #define F_ULOCK 0 | 17 #define F_ULOCK 0 |
18 #define F_LOCK 1 | 18 #define F_LOCK 1 |
19 #define F_TLOCK 2 | 19 #define F_TLOCK 2 |
| 20 #define AT_EACCESS 1 |
| 21 #define AT_SYMLINK_NOFOLLOW 2 |
| 22 #define AT_SYMLINK_FOLLOW 4 |
| 23 #define AT_REMOVEDIR 8 |
20 | 24 |
21 #if __BSD_VISIBLE | 25 #if __BSD_VISIBLE |
22 /* lock operations for flock(2) */ | 26 /* lock operations for flock(2) */ |
23 #define LOCK_SH 0x01 /* shared file lock */ | 27 #define LOCK_SH 0x01 /* shared file lock */ |
24 #define LOCK_EX 0x02 /* exclusive file lock */ | 28 #define LOCK_EX 0x02 /* exclusive file lock */ |
25 #define LOCK_NB 0x04 /* don't block when locking */ | 29 #define LOCK_NB 0x04 /* don't block when locking */ |
26 #define LOCK_UN 0x08 /* unlock file */ | 30 #define LOCK_UN 0x08 /* unlock file */ |
27 #endif | 31 #endif |
28 | 32 |
29 int lockf(int fd, int command, off_t size); | 33 int lockf(int fd, int command, off_t size); |
| 34 int flock(int fd, int operation); |
30 | 35 |
31 __END_DECLS | 36 __END_DECLS |
32 | 37 |
33 #endif | 38 #endif |
OLD | NEW |