numerous fixes to sysv ipc
[musl] / include / fcntl.h
1 #ifndef _FCNTL_H
2 #define _FCNTL_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #define __NEED_off_t
9 #define __NEED_pid_t
10 #define __NEED_mode_t
11
12 #include <bits/alltypes.h>
13
14 #include <bits/fcntl.h>
15
16 struct flock
17 {
18         short l_type;
19         short l_whence;
20         off_t l_start;
21         off_t l_len;
22         pid_t l_pid;
23 };
24
25 int creat(const char *, mode_t);
26 int fcntl(int, int, ...);
27 int open(const char *, int, ...);
28 int openat(int, const char *, int, ...);
29 int posix_fadvise(int, off_t, off_t, int);
30 int posix_fallocate(int, off_t, off_t);
31
32 #undef SEEK_SET
33 #undef SEEK_CUR
34 #undef SEEK_END
35 #define SEEK_SET 0
36 #define SEEK_CUR 1
37 #define SEEK_END 2
38
39 #ifndef S_IRUSR
40 #define S_ISUID 04000
41 #define S_ISGID 02000
42 #define S_ISVTX 01000
43 #define S_IRUSR 0400
44 #define S_IWUSR 0200
45 #define S_IXUSR 0100
46 #define S_IRWXU 0700
47 #define S_IRGRP 0040
48 #define S_IWGRP 0020
49 #define S_IXGRP 0010
50 #define S_IRWXG 0070
51 #define S_IROTH 0004
52 #define S_IWOTH 0002
53 #define S_IXOTH 0001
54 #define S_IRWXO 0007
55 #endif
56
57 #ifdef __cplusplus
58 }
59 #endif
60
61 #endif