1139743Simp/*- 243412Snewton * Copyright (c) 1998 Mark Newton 343412Snewton * Copyright (c) 1994 Christos Zoulas 443412Snewton * All rights reserved. 543412Snewton * 643412Snewton * Redistribution and use in source and binary forms, with or without 743412Snewton * modification, are permitted provided that the following conditions 843412Snewton * are met: 943412Snewton * 1. Redistributions of source code must retain the above copyright 1043412Snewton * notice, this list of conditions and the following disclaimer. 1143412Snewton * 2. Redistributions in binary form must reproduce the above copyright 1243412Snewton * notice, this list of conditions and the following disclaimer in the 1343412Snewton * documentation and/or other materials provided with the distribution. 1443412Snewton * 3. The name of the author may not be used to endorse or promote products 1543412Snewton * derived from this software without specific prior written permission 1643412Snewton * 1743412Snewton * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1843412Snewton * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1943412Snewton * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2043412Snewton * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2143412Snewton * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2243412Snewton * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2343412Snewton * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2443412Snewton * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2543412Snewton * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2643412Snewton * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2749267Snewton * 2850477Speter * $FreeBSD$ 2943412Snewton */ 3043412Snewton 3143412Snewton#ifndef _SVR4_FCNTL_H_ 3243412Snewton#define _SVR4_FCNTL_H_ 3343412Snewton 3465302Sobrien#include <compat/svr4/svr4_types.h> 3543412Snewton#include <sys/fcntl.h> 3643412Snewton 3743412Snewton#define SVR4_O_RDONLY 0x0000 3843412Snewton#define SVR4_O_WRONLY 0x0001 3943412Snewton#define SVR4_O_RDWR 0x0002 4043412Snewton#define SVR4_O_ACCMODE 0x0003 4143412Snewton#define SVR4_O_NDELAY 0x0004 4243412Snewton#define SVR4_O_APPEND 0x0008 4343412Snewton#define SVR4_O_SYNC 0x0010 4443412Snewton#define SVR4_O_NONBLOCK 0x0080 4543412Snewton#define SVR4_O_CREAT 0x0100 4643412Snewton#define SVR4_O_TRUNC 0x0200 4743412Snewton#define SVR4_O_EXCL 0x0400 4843412Snewton#define SVR4_O_NOCTTY 0x0800 4943412Snewton#define SVR4_O_PRIV 0x1000 5043412Snewton 5143412Snewton 5243412Snewton#define SVR4_FD_CLOEXEC 1 5343412Snewton 5443412Snewton#define SVR4_F_DUPFD 0 5543412Snewton#define SVR4_F_GETFD 1 5643412Snewton#define SVR4_F_SETFD 2 5743412Snewton#define SVR4_F_GETFL 3 5843412Snewton#define SVR4_F_SETFL 4 5943412Snewton#define SVR4_F_GETLK_SVR3 5 6043412Snewton#define SVR4_F_SETLK 6 6143412Snewton#define SVR4_F_SETLKW 7 6243412Snewton#define SVR4_F_CHKFL 8 6343412Snewton#define SVR4_F_DUP2FD 9 6443412Snewton#define SVR4_F_ALLOCSP 10 6543412Snewton#define SVR4_F_FREESP 11 6643412Snewton 6743412Snewton#define SVR4_F_ISSTREAM 13 6843412Snewton#define SVR4_F_GETLK 14 6943412Snewton#define SVR4_F_PRIV 15 7043412Snewton#define SVR4_F_NPRIV 16 7143412Snewton#define SVR4_F_QUOTACTL 17 7243412Snewton#define SVR4_F_BLOCKS 18 7343412Snewton#define SVR4_F_BLKSIZE 19 7443412Snewton#define SVR4_F_RSETLK 20 7543412Snewton#define SVR4_F_RGETLK 21 7643412Snewton#define SVR4_F_RSETLKW 22 7743412Snewton#define SVR4_F_GETOWN 23 7843412Snewton#define SVR4_F_SETOWN 24 7943412Snewton#define SVR4_F_REVOKE 25 8043412Snewton#define SVR4_F_HASREMOTELOCKS 26 8143412Snewton#define SVR4_F_FREESP64 27 8243412Snewton 8343412Snewton#define SVR4_F_GETLK64 33 8443412Snewton#define SVR4_F_SETLK64 34 8543412Snewton#define SVR4_F_SETLKW64 35 8643412Snewton 8743412Snewton#define SVR4_F_SHARE 40 8843412Snewton#define SVR4_F_UNSHARE 41 8943412Snewton 9043412Snewton#define SVR4_F_CHSIZE_XENIX 0x6000 9143412Snewton#define SVR4_F_RDCHK_XENIX 0x6001 9243412Snewton#define SVR4_F_LK_UNLCK_XENIX 0x6300 9343412Snewton#define SVR4_F_LK_LOCK_XENIX 0x7200 9443412Snewton#define SVR4_F_LK_NBLCK_XENIX 0x6200 9543412Snewton#define SVR4_F_LK_RLCK_XENIX 0x7100 9643412Snewton#define SVR4_F_LK_NBRLCK_XENIX 0x6100 9743412Snewton 9843412Snewton#define SVR4_LK_CMDTYPE(x) (((x) >> 12) & 0x7) 9943412Snewton#define SVR4_LK_LCKTYPE(x) (((x) >> 8) & 0x7) 10043412Snewton 10143412Snewton#define SVR4_F_RDLCK 1 10243412Snewton#define SVR4_F_WRLCK 2 10343412Snewton#define SVR4_F_UNLCK 3 10443412Snewton 10543412Snewtonstruct svr4_flock_svr3 { 10643412Snewton short l_type; 10743412Snewton short l_whence; 10843412Snewton svr4_off_t l_start; 10943412Snewton svr4_off_t l_len; 11043412Snewton short l_sysid; 11143412Snewton svr4_o_pid_t l_pid; 11243412Snewton}; 11343412Snewton 11443412Snewton 11543412Snewtonstruct svr4_flock { 11643412Snewton short l_type; 11743412Snewton short l_whence; 11843412Snewton svr4_off_t l_start; 11943412Snewton svr4_off_t l_len; 12043412Snewton long l_sysid; 12143412Snewton svr4_pid_t l_pid; 12243412Snewton long pad[4]; 12343412Snewton}; 12443412Snewton 12543412Snewtonstruct svr4_flock64 { 12643412Snewton short l_type; 12743412Snewton short l_whence; 12843412Snewton svr4_off64_t l_start; 12943412Snewton svr4_off64_t l_len; 13043412Snewton long l_sysid; 13143412Snewton svr4_pid_t l_pid; 13243412Snewton long pad[4]; 13343412Snewton}; 13443412Snewton#endif /* !_SVR4_FCNTL_H_ */ 135