Annotation of sys/compat/svr4/svr4_fcntl.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: svr4_fcntl.h,v 1.4 2000/08/23 19:31:34 fgsch Exp $ */
! 2: /* $NetBSD: svr4_fcntl.h,v 1.3 1994/10/29 00:43:19 christos Exp $ */
! 3:
! 4: /*
! 5: * Copyright (c) 1994 Christos Zoulas
! 6: * All rights reserved.
! 7: *
! 8: * Redistribution and use in source and binary forms, with or without
! 9: * modification, are permitted provided that the following conditions
! 10: * are met:
! 11: * 1. Redistributions of source code must retain the above copyright
! 12: * notice, this list of conditions and the following disclaimer.
! 13: * 2. Redistributions in binary form must reproduce the above copyright
! 14: * notice, this list of conditions and the following disclaimer in the
! 15: * documentation and/or other materials provided with the distribution.
! 16: * 3. The name of the author may not be used to endorse or promote products
! 17: * derived from this software without specific prior written permission
! 18: *
! 19: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
! 20: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! 21: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
! 22: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
! 23: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
! 24: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
! 25: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
! 26: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
! 27: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
! 28: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! 29: */
! 30:
! 31: #ifndef _SVR4_FCNTL_H_
! 32: #define _SVR4_FCNTL_H_
! 33:
! 34: #include <compat/svr4/svr4_types.h>
! 35: #include <sys/fcntl.h>
! 36:
! 37: #define SVR4_O_RDONLY 0x0000
! 38: #define SVR4_O_WRONLY 0x0001
! 39: #define SVR4_O_RDWR 0x0002
! 40: #define SVR4_O_ACCMODE 0x0003
! 41: #define SVR4_O_NDELAY 0x0004
! 42: #define SVR4_O_APPEND 0x0008
! 43: #define SVR4_O_SYNC 0x0010
! 44: #if 0
! 45: /* Dellism ??? */
! 46: #define SVR4_O_RAIOSIG 0x0020
! 47: #endif
! 48: #define SVR4_O_DSYNC 0x0040
! 49: #define SVR4_O_NONBLOCK 0x0080
! 50: #define SVR4_O_CREAT 0x0100
! 51: #define SVR4_O_TRUNC 0x0200
! 52: #define SVR4_O_EXCL 0x0400
! 53: #define SVR4_O_NOCTTY 0x0800
! 54: #define SVR4_O_PRIV 0x1000
! 55: #define SVR4_O_LARGEFILE 0x2000
! 56: #define SVR4_O_RSYNC 0x8000
! 57:
! 58:
! 59: #define SVR4_FD_CLOEXEC 1
! 60:
! 61: #define SVR4_F_DUPFD 0
! 62: #define SVR4_F_GETFD 1
! 63: #define SVR4_F_SETFD 2
! 64: #define SVR4_F_GETFL 3
! 65: #define SVR4_F_SETFL 4
! 66: #define SVR4_F_GETLK_SVR3 5
! 67: #define SVR4_F_SETLK 6
! 68: #define SVR4_F_SETLKW 7
! 69: #define SVR4_F_CHKFL 8
! 70: #define SVR4_F_DUP2FD 9
! 71: #define SVR4_F_ALLOCSP 10
! 72: #define SVR4_F_FREESP 11
! 73:
! 74: #define SVR4_F_GETLK 14
! 75: #define SVR4_F_RSETLK 20
! 76: #define SVR4_F_RGETLK 21
! 77: #define SVR4_F_RSETLKW 22
! 78: #define SVR4_F_GETOWN 23
! 79: #define SVR4_F_SETOWN 24
! 80:
! 81: #define SVR4_F_CHSIZE_XENIX 0x6000
! 82: #define SVR4_F_RDCHK_XENIX 0x6001
! 83: #define SVR4_F_LK_UNLCK_XENIX 0x6300
! 84: #define SVR4_F_LK_LOCK_XENIX 0x7200
! 85: #define SVR4_F_LK_NBLCK_XENIX 0x6200
! 86: #define SVR4_F_LK_RLCK_XENIX 0x7100
! 87: #define SVR4_F_LK_NBRLCK_XENIX 0x6100
! 88:
! 89: #define SVR4_LK_CMDTYPE(x) (((x) >> 12) & 0x7)
! 90: #define SVR4_LK_LCKTYPE(x) (((x) >> 8) & 0x7)
! 91:
! 92: #define SVR4_F_RDLCK 1
! 93: #define SVR4_F_WRLCK 2
! 94: #define SVR4_F_UNLCK 3
! 95:
! 96: struct svr4_flock_svr3 {
! 97: short l_type;
! 98: short l_whence;
! 99: svr4_off_t l_start;
! 100: svr4_off_t l_len;
! 101: short l_sysid;
! 102: svr4_o_pid_t l_pid;
! 103: };
! 104:
! 105: struct svr4_flock {
! 106: short l_type;
! 107: short l_whence;
! 108: svr4_off_t l_start;
! 109: svr4_off_t l_len;
! 110: long l_sysid;
! 111: svr4_pid_t l_pid;
! 112: long pad[4];
! 113: };
! 114:
! 115: struct svr4_flock64 {
! 116: short l_type;
! 117: short l_whence;
! 118: svr4_off64_t l_start;
! 119: svr4_off64_t l_len;
! 120: long l_sysid;
! 121: svr4_pid_t l_pid;
! 122: long pad[4];
! 123: };
! 124:
! 125: #endif /* !_SVR4_FCNTL_H_ */
CVSweb