HPPA: Use <bits/fcntl-linux.h>
[glibc.git] / ports / sysdeps / unix / sysv / linux / hppa / bits / fcntl.h
blob47a7ed285cf90495715ea7836336ef8977f91610
1 /* O_*, F_*, FD_* bit values for Linux.
2 Copyright (C) 1995-2012 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
41 #define __O_LARGEFILE 00004000
43 #define F_GETLK64 8 /* Get record locking info. */
44 #define F_SETLK64 9 /* Set record locking info (non-blocking). */
45 #define F_SETLKW64 10 /* Set record locking info (blocking). */
47 #define __F_GETOWN 11 /* Get owner of socket (receiver of SIGIO). */
48 #define __F_SETOWN 12 /* Set owner of socket (receiver of SIGIO). */
50 #define __F_SETSIG 13 /* Set number of signal to be sent. */
51 #define __F_GETSIG 14 /* Get number of signal to be sent. */
53 /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
54 #define F_RDLCK 1 /* Read lock. */
55 #define F_WRLCK 2 /* Write lock. */
56 #define F_UNLCK 3 /* Remove lock. */
58 struct flock
60 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
61 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
62 #ifndef __USE_FILE_OFFSET64
63 __off_t l_start; /* Offset where the lock begins. */
64 __off_t l_len; /* Size of the locked area; zero means until EOF. */
65 #else
66 __off64_t l_start; /* Offset where the lock begins. */
67 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
68 #endif
69 __pid_t l_pid; /* Process holding the lock. */
72 #ifdef __USE_LARGEFILE64
73 struct flock64
75 short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
76 short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
77 __off64_t l_start; /* Offset where the lock begins. */
78 __off64_t l_len; /* Size of the locked area; zero means until EOF. */
79 __pid_t l_pid; /* Process holding the lock. */
81 #endif
83 /* Include generic Linux declarations. */
84 #include <bits/fcntl-linux.h>