]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / hppa / bits / fcntl.h
CommitLineData
930046be 1/* O_*, F_*, FD_* bit values for Linux.
581c785b 2 Copyright (C) 1995-2022 Free Software Foundation, Inc.
f7c460d4
UD
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
3214b89b
AJ
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.
f7c460d4
UD
9
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
3214b89b 13 Lesser General Public License for more details.
f7c460d4 14
3214b89b 15 You should have received a copy of the GNU Lesser General Public
ab84e3ff 16 License along with the GNU C Library. If not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
f7c460d4 18
b8eca7ff 19#ifndef _FCNTL_H
f7c460d4
UD
20# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
21#endif
22
f7c460d4 23#define O_CREAT 00000400 /* not fcntl */
f7c460d4 24#define O_EXCL 00002000 /* not fcntl */
b8eca7ff 25#define O_NOCTTY 00400000 /* not fcntl */
b8eca7ff 26#define O_APPEND 00000010
a24f414b 27#define O_NONBLOCK 00200000
76a82e29 28#define __O_DSYNC 01000000
49f476f4 29#define __O_SYNC 00100000
76a82e29 30#define O_SYNC (__O_SYNC|__O_DSYNC)
f7c460d4 31
76a82e29
AJ
32#define __O_DIRECTORY 000010000 /* Must be a directory. */
33#define __O_NOFOLLOW 000000200 /* Do not follow links. */
34#define __O_CLOEXEC 010000000 /* Set close_on_exec. */
35#define __O_NOATIME 004000000 /* Do not set atime. */
36#define __O_PATH 020000000
ffdd3181 37#define __O_TMPFILE 040010000 /* Atomically create nameless file. */
f7c460d4 38
76a82e29 39#define __O_LARGEFILE 00004000
b8eca7ff 40
f7c460d4
UD
41#define F_GETLK64 8 /* Get record locking info. */
42#define F_SETLK64 9 /* Set record locking info (non-blocking). */
43#define F_SETLKW64 10 /* Set record locking info (blocking). */
44
76a82e29
AJ
45#define __F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */
46#define __F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */
700494fc 47
76a82e29
AJ
48#define __F_SETSIG 13 /* Set number of signal to be sent. */
49#define __F_GETSIG 14 /* Get number of signal to be sent. */
f7c460d4
UD
50
51/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
52#define F_RDLCK 1 /* Read lock. */
53#define F_WRLCK 2 /* Write lock. */
54#define F_UNLCK 3 /* Remove lock. */
55
f7c460d4
UD
56struct flock
57 {
b8eca7ff 58 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
f7c460d4
UD
59 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
60#ifndef __USE_FILE_OFFSET64
61 __off_t l_start; /* Offset where the lock begins. */
62 __off_t l_len; /* Size of the locked area; zero means until EOF. */
63#else
64 __off64_t l_start; /* Offset where the lock begins. */
65 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
66#endif
67 __pid_t l_pid; /* Process holding the lock. */
68 };
69
70#ifdef __USE_LARGEFILE64
71struct flock64
72 {
b8eca7ff 73 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
f7c460d4
UD
74 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
75 __off64_t l_start; /* Offset where the lock begins. */
76 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
77 __pid_t l_pid; /* Process holding the lock. */
78 };
79#endif
80
76a82e29
AJ
81/* Include generic Linux declarations. */
82#include <bits/fcntl-linux.h>