1: /* $Header: /home/hyperion/mu/christos/src/sys/tcsh-6.00/RCS/sh.types.h,v 3.0 1991/07/04 23:38:32 christos Exp $ */
   2: /* sh.types.h: Do the necessary typedefs for each system.
   3:  *             Up till now I avoided making this into a separate file
   4:  *	       But I just wanted to eliminate the whole mess from sh.h
   5:  *	       In reality this should not be here! It is OS and MACHINE
   6:  *	       dependent, even between different revisions of OS's...
   7:  *	       Ideally there should be a way in c, to find out if something
   8:  *	       was typedef'ed, but unfortunately we rely in cpp kludges.
   9:  *	       Someday, this file will be removed...
  10:  *
  11:  *						christos
  12:  */
  13: /*-
  14:  * Copyright (c) 1980, 1991 The Regents of the University of California.
  15:  * All rights reserved.
  16:  *
  17:  * Redistribution and use in source and binary forms, with or without
  18:  * modification, are permitted provided that the following conditions
  19:  * are met:
  20:  * 1. Redistributions of source code must retain the above copyright
  21:  *    notice, this list of conditions and the following disclaimer.
  22:  * 2. Redistributions in binary form must reproduce the above copyright
  23:  *    notice, this list of conditions and the following disclaimer in the
  24:  *    documentation and/or other materials provided with the distribution.
  25:  * 3. All advertising materials mentioning features or use of this software
  26:  *    must display the following acknowledgement:
  27:  *	This product includes software developed by the University of
  28:  *	California, Berkeley and its contributors.
  29:  * 4. Neither the name of the University nor the names of its contributors
  30:  *    may be used to endorse or promote products derived from this software
  31:  *    without specific prior written permission.
  32:  *
  33:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  34:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  35:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  36:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  37:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  38:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  39:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  40:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  41:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  42:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  43:  * SUCH DAMAGE.
  44:  */
  45: #ifndef _h_sh_types
  46: #define _h_sh_types
  47: 
  48: 
  49: /***
  50:  *** Suns running sunos4.1
  51:  ***/
  52: #ifdef sun
  53: /* This used to be long, but lint dissagrees... */
  54: # ifndef _SIGMASK_T
  55: #  define _SIGMASK_T
  56:     typedef int sigmask_t;
  57: # endif /* _SIGMASK_T */
  58: # ifndef _PTR_T
  59: #  define _PTR_T
  60: #   ifdef __GNUC__
  61:     typedef void * ptr_t;
  62: #   else
  63:     typedef char * ptr_t;
  64: #   endif /* __GNUC__ */
  65: # endif /* _PTR_T */
  66: # ifndef _SIZE_T
  67: #  define _SIZE_T
  68: # endif /* _SIZE_T */
  69: # ifndef __sys_stdtypes_h
  70: #  define __sys_stdtypes_h
  71:     typedef int pid_t;
  72:     typedef unsigned int speed_t;
  73: # endif /* __sys_stdtypes.h */
  74: # ifndef _PID_T
  75: #  define _PID_T
  76: # endif /* _PID_T */
  77: # ifndef _SPEED_T
  78: #  define _SPEED_T
  79: # endif /* _SPEED_T */
  80: # ifdef notdef
  81: /*
  82:  * This is what sun's lint wants, but the .h file disagree
  83:  */
  84: extern char *getwd();
  85: extern time_t time();
  86: extern int getuid(), geteuid();
  87: extern int getgid(), getguid();
  88: extern int _exit();
  89: extern int abort();
  90: extern int alarm();
  91: extern void endpwent();
  92: extern char *sbrk();
  93: extern int sleep();
  94: # endif /* notdef */
  95: #endif /*sun */
  96: 
  97: 
  98: /***
  99:  *** Hp's running hpux 7.0
 100:  ***/
 101: #ifdef __hpux
 102: # ifndef _SIZE_T
 103: #  define _SIZE_T
 104:     typedef unsigned int size_t;
 105: # endif /* _SIZE_T */
 106: 
 107: # ifndef _PTR_T
 108: # define _PTR_T
 109:     typedef void * ptr_t;
 110: # endif /* _PTR_T */
 111: 
 112: # ifndef _PID_T
 113: #  define _PID_T
 114:     typedef long pid_t;
 115: # endif /* _PID_T */
 116: 
 117: # ifndef _SIGMASK_T
 118: #  define _SIGMASK_T
 119:     typedef long sigmask_t;
 120: # endif /* _SIGMASK_T */
 121: 
 122: # ifndef _SPEED_T
 123:    /* I thought POSIX was supposed to protect all typedefs! */
 124: #  define _SPEED_T
 125: # endif /* _SPEED_T */
 126: 
 127: extern uid_t getuid(), geteuid();
 128: extern gid_t getgid(), getegid();
 129: extern sigmask_t sigblock();
 130: extern sigmask_t sigsetmask();
 131: #ifndef __hp9000s700
 132: extern void sigpause();
 133: extern sigmask_t sigspace();
 134: #endif
 135: extern pid_t getpid();
 136: extern pid_t fork();
 137: extern void perror();
 138: extern void _exit();
 139: extern void abort();
 140: extern void qsort();
 141: extern void free();
 142: extern unsigned int alarm();
 143: extern unsigned int sleep();
 144: #ifndef __hp9000s700
 145: extern int lstat();
 146: extern int readlink();
 147: extern int sigvector();
 148: extern int gethostname();
 149: extern int ioctl();
 150: extern int nice();
 151: extern char *sbrk();
 152: #endif
 153: #endif /* __hpux */
 154: 
 155: 
 156: /***
 157:  *** Data General 88000, running dgux ???
 158:  ***/
 159: #ifdef DGUX
 160: /*
 161:  * DGUX types
 162:  */
 163: # ifndef _SIZE_T
 164: #  define _SIZE_T
 165:    typedef unsigned int size_t;
 166: # endif /* _SIZE_T */
 167: #endif
 168: 
 169: 
 170: /***
 171:  *** a PFU/Fujitsu A-xx computer SX/A Edition 60 or later
 172:  ***/
 173: #ifdef SXA
 174: # ifndef _SIZE_T
 175: #  define _SIZE_T
 176: # endif /* _SIZE_T */
 177: #endif /* SXA */
 178: 
 179: 
 180: /***
 181:  *** BSD systems, pre and post 4.3
 182:  ***/
 183: #ifdef BSD
 184: extern uid_t getuid(), geteuid();
 185: extern gid_t getgid(), getegid();
 186: # ifndef _SIZE_T
 187: #  define _SIZE_T
 188: # endif /* _SIZE_T */
 189: #endif /* BSD */
 190: /***
 191:  *** BSD 2_10 has some special needs
 192:  ***/
 193: #ifdef pdp11
 194: # ifndef _SIGMASK_T
 195: #  define _SIGMASK_T
 196: #   ifndef sigmask_t
 197: #    define sigmask_t sigm_t
 198: #   endif
 199:     typedef long sigm_t;
 200: # endif /* _SIGMASK_T */
 201: #endif /* pdp11 */
 202: 
 203: /***
 204:  *** BSD RENO advertises itself as POSIX, but
 205:  *** it is missing speed_t (newer versions of RENO have it)
 206:  ***/
 207: #ifdef RENO
 208: # ifndef _SPEED_T
 209: #  define _SPEED_T
 210: /*   typedef unsigned int speed_t; */
 211: # endif /* _SPEED_T */
 212: #endif /* RENO */
 213: 
 214: 
 215: /***
 216:  *** rs6000, ibm370, ps2: running flavors of aix.
 217:  ***/
 218: #ifdef IBMAIX
 219: # ifndef _SIZE_T
 220: #  define _SIZE_T
 221: # endif /* _SIZE_T */
 222: # ifndef _PID_T
 223: #  define _PID_T
 224: # endif /* _PID_T */
 225: # ifdef _IBMR2
 226: #  ifndef _SPEED_T
 227: #   define _SPEED_T
 228: #  endif /* _SPEED_T */
 229: # endif /* _IBMR2 */
 230: #endif /* IBMAIX */
 231: 
 232: 
 233: /***
 234:  *** Ultrix...
 235:  ***/
 236: #ifdef ultrix
 237: # ifndef _SIZE_T
 238: #  define _SIZE_T
 239: # endif /* _SIZE_T */
 240: # ifndef _PID_T
 241: #  define _PID_T
 242: # endif /* _PID_T */
 243: #endif /* ultrix */
 244: 
 245: 
 246: /***
 247:  *** Silicon graphics IRIS4D running IRIX3_3
 248:  ***/
 249: #if defined(IRIS4D) && defined(IRIX3_3)
 250: # ifndef _PID_T
 251: #  define _PID_T
 252: # endif /* _PID_T */
 253: #endif /* IRIS4D && IRIX3_3 */
 254: 
 255: 
 256: /***
 257:  *** Sequent
 258:  ***/
 259: #ifdef sequent
 260: # ifndef _SIZE_T
 261: #  define _SIZE_T
 262: # endif /* _SIZE_T */
 263: #endif /* sequent */
 264: 
 265: /***
 266:  *** Apple AUX.
 267:  ***/
 268: #ifdef OREO
 269: # ifndef _SIZE_T
 270: #  define _SIZE_T
 271: # endif /* _SIZE_T */
 272: # ifndef _PID_T
 273: #  define _PID_T
 274: # endif /* _PID_T */
 275: #endif /* OREO */
 276: 
 277: /***
 278:  *** Intel 386, Hypercube
 279:  ***/
 280: #ifdef HYPERCUBE
 281: # ifndef _SIZE_T
 282: #  define _SIZE_T
 283: # endif /* _SIZE_T */
 284: #endif /* HYPERCUBE */
 285: 
 286: /***
 287:  *** Concurrent (Masscomp) running RTU 4.1A & RTU 5.0.
 288:  *** Added, DAS DEC-90.
 289:  ***/
 290: #ifdef  masscomp
 291: # ifndef _SIZE_T
 292: #  define _SIZE_T
 293: # endif /* _SIZE_T */
 294: #endif	/* masscomp */
 295: 
 296: /***
 297:  *** Catch all for non POSIX systems.
 298:  *** Posix things *should* define these automatically
 299:  *** I am open to suggestions on how to do this correctly!
 300:  ***/
 301: #ifndef POSIX
 302: #ifndef pdp11
 303: # ifndef _SIZE_T
 304: #  define _SIZE_T
 305:    typedef int size_t;      /* As sun comments ??? : meaning I take it */
 306: # endif /* _SIZE_T */		/* Until we make the world POSIX... */
 307: 
 308: # ifndef _PID_T
 309: #  define _PID_T
 310:    typedef int pid_t;
 311: # endif /* _PID_T */
 312: #endif /* !pdp11 */
 313: 
 314: # ifndef _SPEED_T
 315: #  define _SPEED_T
 316:    typedef unsigned int speed_t;
 317: # endif /* _SPEED_T */
 318: 
 319: #ifndef _PTR_T
 320: # define _PTR_T
 321:     typedef char * ptr_t;
 322: #endif /* _PTR_T */
 323: 
 324: #ifndef _IOCTL_T
 325: # define _IOCTL_T
 326:     typedef char * ioctl_t; /* Third arg of ioctl */
 327: #endif /* _IOCTL_T */
 328: 
 329: #endif /* ! POSIX */
 330: 
 331: 
 332: 
 333: /***
 334:  *** This is our own junk types.
 335:  ***/
 336: #ifndef _PTR_T
 337: # define _PTR_T
 338:     typedef void * ptr_t;
 339: #endif /* _PTR_T */
 340: 
 341: #ifndef _SIGMASK_T
 342: # define _SIGMASK_T
 343:     typedef int sigmask_t;
 344: #endif /* _SIGMASK_T */
 345: 
 346: #ifndef _IOCTL_T
 347: # define _IOCTL_T
 348:     typedef void * ioctl_t; /* Third arg of ioctl */
 349: #endif /* _IOCTL_T */
 350: 
 351: #endif /* _h_sh_types */

Defined typedef's

pid_t defined in line 71; used 14 times
ptr_t defined in line 61; used 197 times
sigm_t defined in line 199; used 1 times
speed_t defined in line 72; used 2 times

Defined macros

_IOCTL_T defined in line 347; used 2 times
_PID_T defined in line 309; used 7 times
_PTR_T defined in line 337; used 4 times
_SIGMASK_T defined in line 342; used 4 times
_SIZE_T defined in line 304; used 12 times
_SPEED_T defined in line 315; used 5 times
__sys_stdtypes_h defined in line 70; used 1 times
  • in line 69
_h_sh_types defined in line 46; used 1 times
  • in line 45
sigmask_t defined in line 197; never used

Usage of this include

sh.types.h used 1 times
Last modified: 1995-01-06
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3269
Valid CSS Valid XHTML 1.0 Strict