chiark / gitweb /
[PATCH] oops forgot to add the new klibc/include directory
[elogind.git] / klibc / include / arch / mips / klibc / archfcntl.h
1 /*
2  * arch/mips/include/klibc/archfcntl.h
3  *
4  * On MIPS, <asm/fcntl.h> isn't usable (compiling struct stat with
5  * the correct definitions doesn't "just work"), so we need to provide
6  * our own definitions.
7  */
8
9 #ifndef _KLIBC_ARCHFCNTL_H
10 #define _KLIBC_ARCHFCNTL_H
11
12 #ifdef _ASM_FCNTL_H             /* We were too late! */
13 # error "<asm/fcntl.h> included before <klibc/archfcntl.h>"
14 #endif
15 #define _ASM_FCNTL_H            /* Keep <asm/fcntl.h> from getting included */
16
17 #define O_ACCMODE       0x0003
18 #define O_RDONLY        0x0000
19 #define O_WRONLY        0x0001
20 #define O_RDWR          0x0002
21 #define O_APPEND        0x0008
22 #define O_SYNC          0x0010
23 #define O_NONBLOCK      0x0080
24 #define O_CREAT         0x0100
25 #define O_TRUNC         0x0200
26 #define O_EXCL          0x0400
27 #define O_NOCTTY        0x0800
28 #define FASYNC          0x1000
29 #define O_LARGEFILE     0x2000
30 #define O_DIRECT        0x8000
31 #define O_DIRECTORY     0x10000
32 #define O_NOFOLLOW      0x20000
33 #define O_NOATIME       0x40000
34
35 #define O_NDELAY        O_NONBLOCK
36
37 #define F_DUPFD         0
38 #define F_GETFD         1
39 #define F_SETFD         2
40 #define F_GETFL         3
41 #define F_SETFL         4
42 #define F_GETLK         14
43 #define F_SETLK         6
44 #define F_SETLKW        7
45
46 #define F_SETOWN        24
47 #define F_GETOWN        23
48 #define F_SETSIG        10
49 #define F_GETSIG        11
50
51 #define F_GETLK64       33
52 #define F_SETLK64       34
53 #define F_SETLKW64      35
54
55 #define FD_CLOEXEC      1
56
57 #define F_RDLCK         0
58 #define F_WRLCK         1
59 #define F_UNLCK         2
60
61 #define F_EXLCK         4
62 #define F_SHLCK         8
63
64 #define F_INPROGRESS    16
65
66 #define LOCK_SH         1
67 #define LOCK_EX         2
68 #define LOCK_NB         4
69 #define LOCK_UN         8
70
71 #define LOCK_MAND       32
72 #define LOCK_READ       64
73 #define LOCK_WRITE      128
74 #define LOCK_RW         192
75
76 typedef struct flock {
77         short   l_type;
78         short   l_whence;
79         loff_t  l_start;
80         loff_t  l_len;
81         pid_t   l_pid;
82 } flock_t;
83
84 #define F_LINUX_SPECIFIC_BASE   1024
85
86 #endif /* _KLIBC_ARCHFCNTL_H */
87