1 #ifndef _SYS_FILE_H
2 #define _SYS_FILE_H
3 
4 #include <features.h>
5 #include <fcntl.h>
6 
7 #ifndef L_SET
8 
9 #define L_SET           0       /* absolute offset */
10 #define L_INCR          1       /* relative to current offset */
11 #define L_XTND          2       /* relative to end of file */
12 
13 #endif
14 
15 #ifndef LOCK_SH
16 
17 /* Operations for the `flock' call.  */
18 #define LOCK_SH       1    /* Shared lock.  */
19 #define LOCK_EX       2    /* Exclusive lock.  */
20 #define LOCK_UN       8    /* Unlock.  */
21 
22 /* Can be OR'd in to one of the above.  */
23 #define LOCK_NB       4    /* Don't block when locking.  */
24 
25 #endif
26 
27 __BEGIN_DECLS
28 
29 /* Apply or remove an advisory lock, according to OPERATION,
30    on the file FD refers to.  */
31 extern int flock __P ((int __fd, int __operation));
32 
33 __END_DECLS
34 
35 #endif
36