]>
Commit | Line | Data |
---|---|---|
bfff8b1b | 1 | /* Copyright (C) 1991-2017 Free Software Foundation, Inc. |
54d79e99 UD |
2 | This file is part of the GNU C Library. |
3 | ||
4 | The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
5 | modify it under the terms of the GNU Lesser General Public |
6 | License as published by the Free Software Foundation; either | |
7 | version 2.1 of the License, or (at your option) any later version. | |
54d79e99 UD |
8 | |
9 | The GNU C Library is distributed in the hope that it will be useful, | |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 12 | Lesser General Public License for more details. |
54d79e99 | 13 | |
41bdb6e2 | 14 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 PE |
15 | License along with the GNU C Library; if not, see |
16 | <http://www.gnu.org/licenses/>. */ | |
28f540f4 RM |
17 | |
18 | #ifndef _SYS_FILE_H | |
28f540f4 | 19 | #define _SYS_FILE_H 1 |
5107cf1d | 20 | |
28f540f4 RM |
21 | #include <features.h> |
22 | ||
23 | #ifndef _FCNTL_H | |
dfd2257a | 24 | # include <fcntl.h> |
28f540f4 RM |
25 | #endif |
26 | ||
27 | __BEGIN_DECLS | |
28 | ||
29 | ||
30 | /* Alternate names for values for the WHENCE argument to `lseek'. | |
31 | These are the same as SEEK_SET, SEEK_CUR, and SEEK_END, respectively. */ | |
1474b80f | 32 | #ifndef L_SET |
dfd2257a UD |
33 | # define L_SET 0 /* Seek from beginning of file. */ |
34 | # define L_INCR 1 /* Seek from current position. */ | |
35 | # define L_XTND 2 /* Seek from end of file. */ | |
1474b80f | 36 | #endif |
28f540f4 RM |
37 | |
38 | ||
39 | /* Operations for the `flock' call. */ | |
dfd2257a UD |
40 | #define LOCK_SH 1 /* Shared lock. */ |
41 | #define LOCK_EX 2 /* Exclusive lock. */ | |
42 | #define LOCK_UN 8 /* Unlock. */ | |
28f540f4 RM |
43 | |
44 | /* Can be OR'd in to one of the above. */ | |
dfd2257a | 45 | #define LOCK_NB 4 /* Don't block when locking. */ |
28f540f4 RM |
46 | |
47 | ||
48 | /* Apply or remove an advisory lock, according to OPERATION, | |
49 | on the file FD refers to. */ | |
c1422e5b | 50 | extern int flock (int __fd, int __operation) __THROW; |
28f540f4 RM |
51 | |
52 | ||
53 | __END_DECLS | |
54 | ||
55 | #endif /* sys/file.h */ |