File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
include/llvm-libc-macros/linux Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 46
46
#define O_RDWR 00000002
47
47
#define O_WRONLY 00000001
48
48
49
+ #define F_RDLCK 0
50
+ #define F_WRLCK 1
51
+ #define F_UNLCK 2
52
+
49
53
// Special directory FD to indicate that the path argument to
50
54
// openat is relative to the current directory.
51
55
#define AT_FDCWD -100
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ add_libc_unittest(
29
29
libc.src.fcntl.fcntl
30
30
libc.src.fcntl.open
31
31
libc.src.unistd.close
32
+ libc.hdr.types.struct_flock
33
+ libc.hdr.fcntl_macros
32
34
libc.test.UnitTest.ErrnoSetterMatcher
33
35
)
34
36
Original file line number Diff line number Diff line change 6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
+ #include " hdr/fcntl_macros.h"
10
+ #include " hdr/types/struct_flock.h"
9
11
#include " src/errno/libc_errno.h"
10
12
#include " src/fcntl/fcntl.h"
11
13
#include " src/fcntl/open.h"
12
14
#include " src/unistd/close.h"
13
15
#include " test/UnitTest/ErrnoSetterMatcher.h"
14
16
#include " test/UnitTest/Test.h"
15
17
18
+ #include < stdio.h>
19
+ #include < sys/stat.h> // For S_IRWXU
20
+
16
21
TEST (LlvmLibcFcntlTest, FcntlDupfd) {
17
22
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
18
23
constexpr const char *TEST_FILE_NAME = " testdata/fcntl_dup.test" ;
You can’t perform that action at this time.
0 commit comments