Annotation of Net2/arch/hp300/hpux/hpux.h, revision 1.1.1.2

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:  *
1.1.1.2 ! root       40:  *     from: @(#)hpux.h        7.4 (Berkeley) 5/7/91
        !            41:  *     hpux.h,v 1.2 1993/05/22 07:57:59 cgd Exp
1.1       root       42:  */
                     43: 
                     44: #include "hpux_exec.h"
                     45: 
                     46: /* HP-UX style UTSNAME struct used by uname syscall */
                     47: 
                     48: struct hpuxutsname {
                     49:        char    sysname[9];
                     50:        char    nodename[9];
                     51:        char    release[9];
                     52:        char    version[9];
                     53:        char    machine[9];
                     54:        char    idnumber[15];
                     55: };
                     56: 
                     57: /* HP-UX style "old" IOCTLs */
                     58: 
                     59: struct hpuxsgttyb {
                     60:        char    sg_ispeed;
                     61:        char    sg_ospeed;
                     62:        char    sg_erase;
                     63:        char    sg_kill;
                     64:        int     sg_flags;       /* only a short in BSD */
                     65: };
                     66: 
                     67: #define V7_HUPCL       00001
                     68: #define V7_XTABS       00002
                     69: #define V7_NOAL                04000
                     70: 
                     71: #define        HPUXTIOCGETP    _IOR('t', 8, struct hpuxsgttyb)
                     72: #define        HPUXTIOCSETP    _IOW('t', 9, struct hpuxsgttyb)
                     73: 
                     74: /* 6.5 job control related ioctls which need to be mapped */
                     75: 
                     76: #define        HPUXTIOCSLTC    _IOW('T', 23, struct ltchars)
                     77: #define        HPUXTIOCGLTC    _IOR('T', 24, struct ltchars)
                     78: #define        HPUXTIOCLBIS    _IOW('T', 25, int)
                     79: #define        HPUXTIOCLBIC    _IOW('T', 26, int)
                     80: #define        HPUXTIOCLSET    _IOW('T', 27, int)
                     81: #define        HPUXTIOCLGET    _IOR('T', 28, int)
                     82: #      define HPUXLTOSTOP      0000001
                     83: #define        HPUXTIOCSPGRP   _IOW('T', 29, int)
                     84: #define        HPUXTIOCGPGRP   _IOR('T', 30, int)
                     85: #define HPUXTIOCCONS   _IO('t', 104)
                     86: 
                     87: /* non-blocking IO--doesn't interfere with O_NDELAY */
                     88: #define HPUXFIOSNBIO   _IOW('f', 126, int)
                     89: 
                     90: /* HP-UX stat structure */
                     91: 
                     92: #define bsdtohpuxdev(d)        ((major(d) << 24) | minor(d))
                     93: 
                     94: struct hpuxstat {
                     95:        long    hst_dev;
                     96:        u_long  hst_ino;
                     97:        u_short hst_mode;
                     98:        short   hst_nlink;
                     99:        u_short hst_uid;
                    100:        u_short hst_gid;
                    101:        long    hst_rdev;
                    102:        off_t   hst_size;
                    103:        time_t  hst_atime;
                    104:        int     hst_spare1;
                    105:        time_t  hst_mtime;
                    106:        int     hst_spare2;
                    107:        time_t  hst_ctime;
                    108:        int     hst_spare3;
                    109:        long    hst_blksize;
                    110:        long    hst_blocks;
                    111:        u_int   hst_remote;
                    112:        long    hst_netdev;     
                    113:        u_long  hst_netino;
                    114:        long    hst_spare4[9];
                    115: };
                    116: 
                    117: /*
                    118:  * Skeletal 6.X HP-UX user structure info for ptrace() mapping.
                    119:  * Yes, this is as bogus as it gets...
                    120:  */
                    121: 
                    122: /* 6.0/6.2 offsets */
                    123: #define ooHU_AROFF     0x004
                    124: #define ooHU_TSOFF     0x092
                    125: #define ooHU_EDOFF     0x91E
                    126: #define ooHU_FPOFF     0xA66
                    127: 
                    128: /* 6.5 offsets */
                    129: #define oHU_AROFF      0x004
                    130: #define oHU_TSOFF      0x0B2
                    131: #define oHU_EDOFF      0x93A
                    132: #define oHU_FPOFF      0xA86
                    133: 
                    134: /* 7.X offsets */
                    135: #define HU_AROFF       0x004
                    136: #define HU_TSOFF       0x0B4
                    137: #define HU_EDOFF       0x8C8
                    138: #define HU_FPOFF       0xA28
                    139: 
                    140: #define HU_PAD1        (HU_AROFF)
                    141: #define HU_PAD2        (HU_TSOFF-HU_AROFF-4)
                    142: #define HU_PAD3        (HU_EDOFF-HU_TSOFF-12)
                    143: #define HU_PAD4        (HU_FPOFF-HU_EDOFF-sizeof(struct hpux_exec))
                    144: 
                    145: struct hpuxuser {
                    146:        u_char  whocares1[HU_PAD1];     /* +0x000 */
                    147:        int     *hpuxu_ar0;             /* +0x004 */
                    148:        u_char  whocares2[HU_PAD2];     /* +0x008 */
                    149:        int     hpuxu_tsize;            /* +0x0B2 */
                    150:        int     hpuxu_dsize;            /* +0x0B6 */
                    151:        int     hpuxu_ssize;            /* +0x0BA */
                    152:        u_char  whocares3[HU_PAD3];     /* +0x0BE */
                    153:        struct  hpux_exec hpuxu_exdata; /* +0x93A */
                    154:        u_char  whocares4[HU_PAD4];     /* +0x95E */
                    155:        struct  hpuxfp {                /* +0xA66 */
                    156:                int hpfp_save[54];
                    157:                int hpfp_ctrl[3];
                    158:                int hpfp_reg[24];
                    159:        } hpuxu_fp;
                    160:        short   hpuxu_dragon;           /* +0xBCA */
                    161: };
                    162: 
                    163: /* HP-UX compat file flags */
                    164: #define HPUXFCREAT     00000400
                    165: #define        HPUXFTRUNC      00001000
                    166: #define        HPUXFEXCL       00002000
                    167: #define HPUXFSYNCIO    00100000
                    168: #define HPUXFREMOTE    01000000
                    169: #define FUSECACHE      04000000
                    170: 
                    171: /* HP-UX only sysV shmctl() commands */
                    172: #define SHM_LOCK       3       /* Lock segment in core */
                    173: #define SHM_UNLOCK     4       /* Unlock segment */
                    174: 
                    175: /* HP-UX rtprio values */
                    176: #define RTPRIO_MIN     0
                    177: #define RTPRIO_MAX     127
                    178: #define RTPRIO_NOCHG   1000
                    179: #define RTPRIO_RTOFF   1001
                    180: 
                    181: /* HP-UX only sigvec sv_flags values */
                    182: #define HPUXSV_RESET   000000004
                    183: 
                    184: /*
                    185:  * HP-UX returns SIGILL instead of SIGFPE for the CHK and TRAPV exceptions.
                    186:  * It also returns different u_code values for certain illegal instruction
                    187:  * and floating point exceptions.  Here are the proper HP-UX u_code values
                    188:  * (numbers from hpux 6.2 manual pages).
                    189:  */
                    190: 
                    191: /* SIGILL codes */
                    192: #define        HPUX_ILL_ILLINST_TRAP   0       /* T_ILLINST+USER */
                    193: #define        HPUX_ILL_CHK_TRAP       6       /* T_CHKINST+USER */
                    194: #define        HPUX_ILL_TRAPV_TRAP     7       /* T_TRAPVINST+USER */
                    195: #define        HPUX_ILL_PRIV_TRAP      8       /* T_PRIVINST+USER */
                    196: 
                    197: /* SIGFPE codes */
                    198: #define        HPUX_FPE_INTDIV_TRAP    5       /* T_ZERODIV+USER */
                    199: 
                    200: /* HP-UX POSIX signal stuff implementation */
                    201: typedef struct __hpuxsigset_t { long sigset[8]; } hpuxsigset_t;
                    202: struct hpuxsigaction {
                    203:        void            (*sa_handler)();
                    204:        hpuxsigset_t    sa_mask;
                    205:        int             sa_flags;
                    206: };
                    207: #define HPUXSA_ONSTACK         1
                    208: #define HPUXSA_RESETHAND       4
                    209: #define HPUXSA_NOCLDSTOP       8
                    210: 
                    211: #define        HPUXSIG_BLOCK   0       /* block specified signal set */
                    212: #define        HPUXSIG_UNBLOCK 1       /* unblock specified signal set */
                    213: #define        HPUXSIG_SETMASK 2       /* set specified signal set */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.