|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1988 University of Utah. ! 3: * Copyright (c) 1990 The Regents of the University of California. ! 4: * All rights reserved. ! 5: * ! 6: * This code is derived from software contributed to Berkeley by ! 7: * the Systems Programming Group of the University of Utah Computer ! 8: * Science Department. ! 9: * ! 10: * Redistribution and use in source and binary forms, with or without ! 11: * modification, are permitted provided that the following conditions ! 12: * are met: ! 13: * 1. Redistributions of source code must retain the above copyright ! 14: * notice, this list of conditions and the following disclaimer. ! 15: * 2. Redistributions in binary form must reproduce the above copyright ! 16: * notice, this list of conditions and the following disclaimer in the ! 17: * documentation and/or other materials provided with the distribution. ! 18: * 3. All advertising materials mentioning features or use of this software ! 19: * must display the following acknowledgement: ! 20: * This product includes software developed by the University of ! 21: * California, Berkeley and its contributors. ! 22: * 4. Neither the name of the University nor the names of its contributors ! 23: * may be used to endorse or promote products derived from this software ! 24: * without specific prior written permission. ! 25: * ! 26: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ! 27: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ! 28: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ! 29: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ! 30: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ! 31: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ! 32: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! 33: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! 34: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ! 35: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ! 36: * SUCH DAMAGE. ! 37: * ! 38: * from: Utah $Hdr: hpux.h 1.18 91/02/09$ ! 39: * ! 40: * @(#)hpux.h 7.4 (Berkeley) 5/7/91 ! 41: */ ! 42: ! 43: #include "hpux_exec.h" ! 44: ! 45: /* HP-UX style UTSNAME struct used by uname syscall */ ! 46: ! 47: struct hpuxutsname { ! 48: char sysname[9]; ! 49: char nodename[9]; ! 50: char release[9]; ! 51: char version[9]; ! 52: char machine[9]; ! 53: char idnumber[15]; ! 54: }; ! 55: ! 56: /* HP-UX style "old" IOCTLs */ ! 57: ! 58: struct hpuxsgttyb { ! 59: char sg_ispeed; ! 60: char sg_ospeed; ! 61: char sg_erase; ! 62: char sg_kill; ! 63: int sg_flags; /* only a short in BSD */ ! 64: }; ! 65: ! 66: #define V7_HUPCL 00001 ! 67: #define V7_XTABS 00002 ! 68: #define V7_NOAL 04000 ! 69: ! 70: #define HPUXTIOCGETP _IOR('t', 8, struct hpuxsgttyb) ! 71: #define HPUXTIOCSETP _IOW('t', 9, struct hpuxsgttyb) ! 72: ! 73: /* 6.5 job control related ioctls which need to be mapped */ ! 74: ! 75: #define HPUXTIOCSLTC _IOW('T', 23, struct ltchars) ! 76: #define HPUXTIOCGLTC _IOR('T', 24, struct ltchars) ! 77: #define HPUXTIOCLBIS _IOW('T', 25, int) ! 78: #define HPUXTIOCLBIC _IOW('T', 26, int) ! 79: #define HPUXTIOCLSET _IOW('T', 27, int) ! 80: #define HPUXTIOCLGET _IOR('T', 28, int) ! 81: # define HPUXLTOSTOP 0000001 ! 82: #define HPUXTIOCSPGRP _IOW('T', 29, int) ! 83: #define HPUXTIOCGPGRP _IOR('T', 30, int) ! 84: #define HPUXTIOCCONS _IO('t', 104) ! 85: ! 86: /* non-blocking IO--doesn't interfere with O_NDELAY */ ! 87: #define HPUXFIOSNBIO _IOW('f', 126, int) ! 88: ! 89: /* HP-UX stat structure */ ! 90: ! 91: #define bsdtohpuxdev(d) ((major(d) << 24) | minor(d)) ! 92: ! 93: struct hpuxstat { ! 94: long hst_dev; ! 95: u_long hst_ino; ! 96: u_short hst_mode; ! 97: short hst_nlink; ! 98: u_short hst_uid; ! 99: u_short hst_gid; ! 100: long hst_rdev; ! 101: off_t hst_size; ! 102: time_t hst_atime; ! 103: int hst_spare1; ! 104: time_t hst_mtime; ! 105: int hst_spare2; ! 106: time_t hst_ctime; ! 107: int hst_spare3; ! 108: long hst_blksize; ! 109: long hst_blocks; ! 110: u_int hst_remote; ! 111: long hst_netdev; ! 112: u_long hst_netino; ! 113: long hst_spare4[9]; ! 114: }; ! 115: ! 116: /* ! 117: * Skeletal 6.X HP-UX user structure info for ptrace() mapping. ! 118: * Yes, this is as bogus as it gets... ! 119: */ ! 120: ! 121: /* 6.0/6.2 offsets */ ! 122: #define ooHU_AROFF 0x004 ! 123: #define ooHU_TSOFF 0x092 ! 124: #define ooHU_EDOFF 0x91E ! 125: #define ooHU_FPOFF 0xA66 ! 126: ! 127: /* 6.5 offsets */ ! 128: #define oHU_AROFF 0x004 ! 129: #define oHU_TSOFF 0x0B2 ! 130: #define oHU_EDOFF 0x93A ! 131: #define oHU_FPOFF 0xA86 ! 132: ! 133: /* 7.X offsets */ ! 134: #define HU_AROFF 0x004 ! 135: #define HU_TSOFF 0x0B4 ! 136: #define HU_EDOFF 0x8C8 ! 137: #define HU_FPOFF 0xA28 ! 138: ! 139: #define HU_PAD1 (HU_AROFF) ! 140: #define HU_PAD2 (HU_TSOFF-HU_AROFF-4) ! 141: #define HU_PAD3 (HU_EDOFF-HU_TSOFF-12) ! 142: #define HU_PAD4 (HU_FPOFF-HU_EDOFF-sizeof(struct hpux_exec)) ! 143: ! 144: struct hpuxuser { ! 145: u_char whocares1[HU_PAD1]; /* +0x000 */ ! 146: int *hpuxu_ar0; /* +0x004 */ ! 147: u_char whocares2[HU_PAD2]; /* +0x008 */ ! 148: int hpuxu_tsize; /* +0x0B2 */ ! 149: int hpuxu_dsize; /* +0x0B6 */ ! 150: int hpuxu_ssize; /* +0x0BA */ ! 151: u_char whocares3[HU_PAD3]; /* +0x0BE */ ! 152: struct hpux_exec hpuxu_exdata; /* +0x93A */ ! 153: u_char whocares4[HU_PAD4]; /* +0x95E */ ! 154: struct hpuxfp { /* +0xA66 */ ! 155: int hpfp_save[54]; ! 156: int hpfp_ctrl[3]; ! 157: int hpfp_reg[24]; ! 158: } hpuxu_fp; ! 159: short hpuxu_dragon; /* +0xBCA */ ! 160: }; ! 161: ! 162: /* HP-UX compat file flags */ ! 163: #define HPUXFCREAT 00000400 ! 164: #define HPUXFTRUNC 00001000 ! 165: #define HPUXFEXCL 00002000 ! 166: #define HPUXFSYNCIO 00100000 ! 167: #define HPUXFREMOTE 01000000 ! 168: #define FUSECACHE 04000000 ! 169: ! 170: /* HP-UX only sysV shmctl() commands */ ! 171: #define SHM_LOCK 3 /* Lock segment in core */ ! 172: #define SHM_UNLOCK 4 /* Unlock segment */ ! 173: ! 174: /* HP-UX rtprio values */ ! 175: #define RTPRIO_MIN 0 ! 176: #define RTPRIO_MAX 127 ! 177: #define RTPRIO_NOCHG 1000 ! 178: #define RTPRIO_RTOFF 1001 ! 179: ! 180: /* HP-UX only sigvec sv_flags values */ ! 181: #define HPUXSV_RESET 000000004 ! 182: ! 183: /* ! 184: * HP-UX returns SIGILL instead of SIGFPE for the CHK and TRAPV exceptions. ! 185: * It also returns different u_code values for certain illegal instruction ! 186: * and floating point exceptions. Here are the proper HP-UX u_code values ! 187: * (numbers from hpux 6.2 manual pages). ! 188: */ ! 189: ! 190: /* SIGILL codes */ ! 191: #define HPUX_ILL_ILLINST_TRAP 0 /* T_ILLINST+USER */ ! 192: #define HPUX_ILL_CHK_TRAP 6 /* T_CHKINST+USER */ ! 193: #define HPUX_ILL_TRAPV_TRAP 7 /* T_TRAPVINST+USER */ ! 194: #define HPUX_ILL_PRIV_TRAP 8 /* T_PRIVINST+USER */ ! 195: ! 196: /* SIGFPE codes */ ! 197: #define HPUX_FPE_INTDIV_TRAP 5 /* T_ZERODIV+USER */ ! 198: ! 199: /* HP-UX POSIX signal stuff implementation */ ! 200: typedef struct __hpuxsigset_t { long sigset[8]; } hpuxsigset_t; ! 201: struct hpuxsigaction { ! 202: void (*sa_handler)(); ! 203: hpuxsigset_t sa_mask; ! 204: int sa_flags; ! 205: }; ! 206: #define HPUXSA_ONSTACK 1 ! 207: #define HPUXSA_RESETHAND 4 ! 208: #define HPUXSA_NOCLDSTOP 8 ! 209: ! 210: #define HPUXSIG_BLOCK 0 /* block specified signal set */ ! 211: #define HPUXSIG_UNBLOCK 1 /* unblock specified signal set */ ! 212: #define HPUXSIG_SETMASK 2 /* set specified signal set */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.