Update copyright dates with scripts/update-copyrights.
[glibc.git] / sysdeps / unix / sysv / linux / hppa / bits / fcntl.h
blob9aad095acdd970fb0c3a203cac257f0343fb9a81
1 /* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2015 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifndef _FCNTL_H
20 # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
21 #endif
23 #define O_CREAT 00000400 /* not fcntl */
24 #define O_EXCL 00002000 /* not fcntl */
25 #define O_NOCTTY 00400000 /* not fcntl */
26 #define O_APPEND 00000010
27 #define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */
28 #define __O_DSYNC 01000000
29 #define __O_RSYNC 02000000 /* HPUX only */
30 #define __O_SYNC 01000000
31 #define O_SYNC (__O_SYNC|__O_DSYNC)
33 #define O_BLKSEEK 00000100 /* HPUX only */
35 #define __O_DIRECTORY 000010000 /* Must be a directory. */
36 #define __O_NOFOLLOW 000000200 /* Do not follow links. */
37 #define __O_CLOEXEC 010000000 /* Set close_on_exec. */
38 #define __O_NOATIME 004000000 /* Do not set atime. */
39 #define __O_PATH 020000000
40 #define __O_TMPFILE 040010000 /* Atomically create nameless file. */
42 #define __O_LARGEFILE 00004000
44 #define F_GETLK64 8 /* Get record locking info. */
45 #define F_SETLK64 9 /* Set record locking info (non-blocking). */
46 #define F_SETLKW64 10 /* Set record locking info (blocking). */
48 #define __F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */
49 #define __F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */
51 #define __F_SETSIG 13 /* Set number of signal to be sent. */
52 #define __F_GETSIG 14 /* Get number of signal to be sent. */
54 /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
55 #define F_RDLCK 1 /* Read lock. */
56 #define F_WRLCK 2 /* Write lock. */
57 #define F_UNLCK 3 /* Remove lock. */
59 struct flock
61 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
62 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
63 #ifndef __USE_FILE_OFFSET64
64 __off_t l_start; /* Offset where the lock begins. */
65 __off_t l_len; /* Size of the locked area; zero means until EOF. */
66 #else
67 __off64_t l_start; /* Offset where the lock begins. */
68 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
69 #endif
70 __pid_t l_pid; /* Process holding the lock. */
73 #ifdef __USE_LARGEFILE64
74 struct flock64
76 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
77 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
78 __off64_t l_start; /* Offset where the lock begins. */
79 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
80 __pid_t l_pid; /* Process holding the lock. */
82 #endif
84 /* Include generic Linux declarations. */
85 #include <bits/fcntl-linux.h>