Usermode/libposix - Added types for F_GETLK
[tpg/acess2.git] / Usermode / Libraries / libposix.so_src / include_exp / fcntl.h
1 /*
2  * Acess2 POSIX Emulation Library
3  * - By John Hodge (thePowersGang)
4  *
5  * fcntl.h
6  * - File descriptor control?
7  */
8
9 #ifndef _FCNTL_H_
10 #define _FCNTL_H_
11
12 struct flock
13 {
14         short   l_type;
15         short   l_whece;
16         off_t   l_start;
17         off_t   l_len;
18         pid_t   l_pid;
19 };
20
21 enum e_fcntl_cmds
22 {
23         F_DUPFD,        // (long)
24         //F_DUPFD_CLOEXEC,      // (long) - Non POSIX
25         F_GETFD,        // (void)
26         F_SETFD,        // (long)
27         F_GETFL,        // (void)
28         F_SETFL,        // (long)
29         
30         F_SETLK,        // (struct flock *)
31         F_SETLKW,       // (struct flock *)
32         F_GETLK,        // (struct flock *)
33 };
34
35 enum e_flock_types
36 {
37         F_RDLCK,        // read
38         F_WRLCK,        // write
39         F_UNLCK,        // unlock
40 };
41
42 extern int fcntl(int fd, int cmd, ...);
43
44 #endif
45

UCC git Repository :: git.ucc.asn.au