|
|
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 is only permitted until one year after the first shipment ! 11: * of 4.4BSD by the Regents. Otherwise, redistribution and use in source and ! 12: * binary forms are permitted provided that: (1) source distributions retain ! 13: * this entire copyright notice and comment, and (2) distributions including ! 14: * binaries display the following acknowledgement: This product includes ! 15: * software developed by the University of California, Berkeley and its ! 16: * contributors'' in the documentation or other materials provided with the ! 17: * distribution and in all advertising materials mentioning features or use ! 18: * of this software. Neither the name of the University nor the names of ! 19: * its contributors may be used to endorse or promote products derived from ! 20: * this software without specific prior written permission. ! 21: * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 22: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 23: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 24: * ! 25: * from: Utah $Hdr: hpux.h 1.15 89/09/25$ ! 26: * ! 27: * @(#)hpux.h 7.1 (Berkeley) 5/8/90 ! 28: */ ! 29: ! 30: #include "hpux_exec.h" ! 31: ! 32: /* HP-UX style UTSNAME struct used by uname syscall */ ! 33: ! 34: struct hpuxutsname { ! 35: char sysname[9]; ! 36: char nodename[9]; ! 37: char release[9]; ! 38: char version[9]; ! 39: char machine[9]; ! 40: char idnumber[15]; ! 41: }; ! 42: ! 43: /* HP-UX style "old" IOCTLs */ ! 44: ! 45: struct hpuxsgttyb { ! 46: char sg_ispeed; ! 47: char sg_ospeed; ! 48: char sg_erase; ! 49: char sg_kill; ! 50: int sg_flags; /* only a short in BSD */ ! 51: }; ! 52: ! 53: #define V7_HUPCL 00001 ! 54: #define V7_XTABS 00002 ! 55: #define V7_NOAL 04000 ! 56: ! 57: #define HPUXTIOCGETP _IOR('t', 8, struct hpuxsgttyb) ! 58: #define HPUXTIOCSETP _IOW('t', 9, struct hpuxsgttyb) ! 59: ! 60: /* 6.5 job control related ioctls which need to be mapped */ ! 61: ! 62: #define HPUXTIOCSLTC _IOW('T', 23, struct ltchars) ! 63: #define HPUXTIOCGLTC _IOR('T', 24, struct ltchars) ! 64: #define HPUXTIOCLBIS _IOW('T', 25, int) ! 65: #define HPUXTIOCLBIC _IOW('T', 26, int) ! 66: #define HPUXTIOCLSET _IOW('T', 27, int) ! 67: #define HPUXTIOCLGET _IOR('T', 28, int) ! 68: # define HPUXLTOSTOP 0000001 ! 69: #define HPUXTIOCSPGRP _IOW('T', 29, int) ! 70: #define HPUXTIOCGPGRP _IOR('T', 30, int) ! 71: #define HPUXTIOCCONS _IO('t', 104) ! 72: ! 73: /* HP-UX directory stuff */ ! 74: ! 75: #define HPUXNSIZ 14 ! 76: #define HPUXPSIZ 10 ! 77: #define HPUXDSIZ sizeof(struct hpuxdirect) ! 78: ! 79: struct hpuxdirect { ! 80: u_long hpuxd_ino; ! 81: u_short hpuxd_reclen; ! 82: u_short hpuxd_namlen; ! 83: char hpuxd_name[HPUXNSIZ]; ! 84: char hpuxd_pad[HPUXPSIZ]; ! 85: }; ! 86: ! 87: /* HP-UX stat structure */ ! 88: ! 89: #define bsdtohpuxdev(d) ((major(d) << 24) | minor(d)) ! 90: ! 91: struct hpuxstat { ! 92: long hst_dev; ! 93: u_long hst_ino; ! 94: u_short hst_mode; ! 95: short hst_nlink; ! 96: u_short hst_uid; ! 97: u_short hst_gid; ! 98: long hst_rdev; ! 99: off_t hst_size; ! 100: time_t hst_atime; ! 101: int hst_spare1; ! 102: time_t hst_mtime; ! 103: int hst_spare2; ! 104: time_t hst_ctime; ! 105: int hst_spare3; ! 106: long hst_blksize; ! 107: long hst_blocks; ! 108: u_int hst_remote; ! 109: long hst_netdev; ! 110: u_long hst_netino; ! 111: long hst_spare4[9]; ! 112: }; ! 113: ! 114: /* ! 115: * Skeletal 6.X HP-UX user structure info for ptrace() mapping. ! 116: * Yes, this is as bogus as it gets... ! 117: */ ! 118: ! 119: /* 6.0/6.2 offsets */ ! 120: #define oHU_AROFF 0x004 ! 121: #define oHU_TSOFF 0x092 ! 122: #define oHU_EDOFF 0x91E ! 123: #define oHU_FPOFF 0xA66 ! 124: ! 125: /* 6.5 offsets */ ! 126: #define HU_AROFF 0x004 ! 127: #define HU_TSOFF 0x0B2 ! 128: #define HU_EDOFF 0x93A ! 129: #define HU_FPOFF 0xA86 ! 130: ! 131: #define HU_PAD1 (HU_AROFF) ! 132: #define HU_PAD2 (HU_TSOFF-HU_AROFF-4) ! 133: #define HU_PAD3 (HU_EDOFF-HU_TSOFF-12) ! 134: #define HU_PAD4 (HU_FPOFF-HU_EDOFF-sizeof(struct hpux_exec)) ! 135: ! 136: struct hpuxuser { ! 137: u_char whocares1[HU_PAD1]; /* +0x000 */ ! 138: int *hpuxu_ar0; /* +0x004 */ ! 139: u_char whocares2[HU_PAD2]; /* +0x008 */ ! 140: int hpuxu_tsize; /* +0x0B2 */ ! 141: int hpuxu_dsize; /* +0x0B6 */ ! 142: int hpuxu_ssize; /* +0x0BA */ ! 143: u_char whocares3[HU_PAD3]; /* +0x0BE */ ! 144: struct hpux_exec hpuxu_exdata; /* +0x93A */ ! 145: u_char whocares4[HU_PAD4]; /* +0x95E */ ! 146: struct hpuxfp { /* +0xA66 */ ! 147: int hpfp_save[54]; ! 148: int hpfp_ctrl[3]; ! 149: int hpfp_reg[24]; ! 150: } hpuxu_fp; ! 151: short hpuxu_dragon; /* +0xBCA */ ! 152: }; ! 153: ! 154: /* HP-UX compat file flags */ ! 155: #define HPUXFCREAT 00000400 ! 156: #define HPUXFTRUNC 00001000 ! 157: #define HPUXFEXCL 00002000 ! 158: #define HPUXFSYNCIO 00100000 ! 159: #define HPUXFREMOTE 01000000 ! 160: #define FUSECACHE 04000000 ! 161: ! 162: /* HP-UX only sysV shmctl() commands */ ! 163: #define SHM_LOCK 3 /* Lock segment in core */ ! 164: #define SHM_UNLOCK 4 /* Unlock segment */ ! 165: ! 166: /* HP-UX rtprio values */ ! 167: #define RTPRIO_MIN 0 ! 168: #define RTPRIO_MAX 127 ! 169: #define RTPRIO_NOCHG 1000 ! 170: #define RTPRIO_RTOFF 1001 ! 171: ! 172: /* HP-UX only sigvec sv_flags values */ ! 173: #define HPUXSV_RESET 000000004 ! 174: ! 175: /* ! 176: * HP-UX returns SIGILL instead of SIGFPE for the CHK and TRAPV exceptions. ! 177: * It also returns different u_code values for certain illegal instruction ! 178: * and floating point exceptions. Here are the proper HP-UX u_code values ! 179: * (numbers from hpux 6.2 manual pages). ! 180: */ ! 181: ! 182: /* SIGILL codes */ ! 183: #define HPUX_ILL_ILLINST_TRAP 0 /* T_ILLINST+USER */ ! 184: #define HPUX_ILL_CHK_TRAP 6 /* T_CHKINST+USER */ ! 185: #define HPUX_ILL_TRAPV_TRAP 7 /* T_TRAPVINST+USER */ ! 186: #define HPUX_ILL_PRIV_TRAP 8 /* T_PRIVINST+USER */ ! 187: ! 188: /* SIGFPE codes */ ! 189: #define HPUX_FPE_INTDIV_TRAP 5 /* T_ZERODIV+USER */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.