# 2.11BSD#431 - /usr/src/bin/tcsh/sh.types.h

##### Macros

    _IOCTL_T          X
    _PID_T            X
    _PTR_T            X
    _SIGMASK_T        X
    _SIZE_T           X
    _SPEED_T          X
    __sys_stdtypes_h  X
    _h_sh_types       X
    sigmask_t         X

##### typedef's

    ioctl_t           X
    pid_t             X
    ptr_t             X
    sigm_t            X
    sigmask_t         X
    size_t            X
    speed_t           X

       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

ioctl_t defined in line 326; used 75 times

- in line 348
- in /usr/src/bin/tcsh/ed.init.c line 222-224(2), 258, 265-275(5), 354, 605-609(2), 616-619(2), 768, 777, 787, 811, 825, 882-885(2), 900-910(5), 925, 940-957(7), 964, 1057, 1068, 1083, 1090
- in /usr/src/bin/tcsh/ed.inputl.c line 92, 502
- in /usr/src/bin/tcsh/ed.screen.c line 1312, 1326
- in /usr/src/bin/tcsh/sh.file.c line 123-138(5), 167-172(3), 197, 207-214(4), 295, 370
- in /usr/src/bin/tcsh/sh.lex.c line 1353-1356(2), 1498
- in /usr/src/bin/tcsh/sh.print.c line 216
- in /usr/src/bin/tcsh/tc.disc.c line 82-87(2), 107-111(2), 120-124(2), 140-142(2), 154-158(2), 187-192(2)
- in /usr/src/bin/tcsh/tc.os.c line 643

pid_t defined in line 71; used 14 times

- in line 114, 135-136(2), 310
- in /usr/src/bin/tcsh/sh.lex.c line 1374
- in /usr/src/bin/tcsh/sh.proc.c line 1432, 1438, 1445, 1452, 1509
- in /usr/src/bin/tcsh/tc.os.c line 366, 379, 387, 465

ptr_t defined in line 61; used 197 times

- in line 63, 109, 321, 338
- in /usr/src/bin/tcsh/ed.chared.c line 407, 413
- in /usr/src/bin/tcsh/ed.init.c line 1004
- in /usr/src/bin/tcsh/ed.screen.c line 528-529(2), 535-536(2)
- in /usr/src/bin/tcsh/ed.xmap.c line 314, 433-434(2)
- in /usr/src/bin/tcsh/glob.c line 66, 565, 757-758(2)
- in /usr/src/bin/tcsh/sh.c line 965, 1116-1117(2), 1419, 1538
- in /usr/src/bin/tcsh/sh.dir.c line 327, 423, 453, 467-471(2), 489, 497, 503, 682, 724, 835, 919, 982, 994
- in /usr/src/bin/tcsh/sh.dol.c line 588, 638
- in /usr/src/bin/tcsh/sh.err.c line 444
- in /usr/src/bin/tcsh/sh.exec.c line 164-165(2), 240, 255, 268, 370, 394, 548, 554, 562, 677, 683-685(2)
- in /usr/src/bin/tcsh/sh.exp.c line 246-251(3), 294-295(2), 324-325(2), 361-362(2), 408-409(2), 432, 442, 532, 585
- in /usr/src/bin/tcsh/sh.file.c line 460-461(2), 568
- in /usr/src/bin/tcsh/sh.func.c line 154, 371, 393, 739, 886-887(2), 1071, 1083, 1132, 1161-1163(2), 1170-1175(2), 1197-1198(2)
- in /usr/src/bin/tcsh/sh.glob.c line 122, 148, 232, 268-273(2), 280, 308-311(2), 322, 336, 379-381(2), 457, 464, 482, 489, 710, 781, 860
- in /usr/src/bin/tcsh/sh.h line 230
- in /usr/src/bin/tcsh/sh.hist.c line 124-125(2)
- in /usr/src/bin/tcsh/sh.lex.c line 237-238(2), 1441, 1540
- in /usr/src/bin/tcsh/sh.misc.c line 154-155(2), 380
- in /usr/src/bin/tcsh/sh.parse.c line 179, 187-188(2), 200-202(2), 670-678(6), 688
- in /usr/src/bin/tcsh/sh.proc.c line 498-502(2)
- in /usr/src/bin/tcsh/sh.sem.c line 369-373(3), 606, 614, 650-651(2), 689-690(2)
- in /usr/src/bin/tcsh/sh.set.c line 182, 225, 326-328(2), 341, 613, 640
- in /usr/src/bin/tcsh/tc.alloc.c line 287, 296-297(2), 385, 484-488(2), 497-503(3), 515-519(2), 535
- in /usr/src/bin/tcsh/tc.func.c line 218, 300, 644, 794-804(4), 922, 974, 984-987(2), 1099-1104(2)
- in /usr/src/bin/tcsh/tc.os.c line 145-165(8), 675
- in /usr/src/bin/tcsh/tc.sched.c line 119, 244
- in /usr/src/bin/tcsh/tc.str.c line 108, 140, 149, 179
- in /usr/src/bin/tcsh/tw.help.c line 138
- in /usr/src/bin/tcsh/tw.init.c line 63, 76, 82, 120
- in /usr/src/bin/tcsh/tw.parse.c line 671, 699, 841, 1003, 1088-1089(2), 1480

sigm_t defined in line 199; used 1 times

- in line 197

sigmask_t defined in line 56; used 55 times

- in line 119, 129-133(3), 343-197(3)
- in /usr/src/bin/tcsh/ed.init.c line 149
- in /usr/src/bin/tcsh/ed.screen.c line 1184
- in /usr/src/bin/tcsh/sh.c line 791, 1026(2), 1260-1264(2), 1357
- in /usr/src/bin/tcsh/sh.exec.c line 193
- in /usr/src/bin/tcsh/sh.file.c line 151, 164, 187, 203, 465
- in /usr/src/bin/tcsh/sh.func.c line 514, 574, 917, 1027, 1590
- in /usr/src/bin/tcsh/sh.hist.c line 138
- in /usr/src/bin/tcsh/sh.proc.c line 451, 484, 529, 631, 648, 1373, 1481, 1637, 1802
- in /usr/src/bin/tcsh/sh.sem.c line 84-86(2), 260, 279
- in /usr/src/bin/tcsh/sh.set.c line 836
- in /usr/src/bin/tcsh/tc.func.c line 210, 441, 522, 557, 594
- in /usr/src/bin/tcsh/tc.os.c line 419
- in /usr/src/bin/tcsh/tc.sched.c line 196
- in /usr/src/bin/tcsh/tc.sig.c line 230, 298-300(2), 331-333(2), 372
- in /usr/src/bin/tcsh/tc.who.c line 156

size_t defined in line 104; used 111 times

- in line 165, 305
- in /usr/src/bin/tcsh/ed.init.c line 1015
- in /usr/src/bin/tcsh/ed.screen.c line 541-548(4)
- in /usr/src/bin/tcsh/ed.xmap.c line 447
- in /usr/src/bin/tcsh/glob.c line 566, 579, 613, 635, 670
- in /usr/src/bin/tcsh/sh.c line 931, 1692
- in /usr/src/bin/tcsh/sh.dir.c line 145, 286, 416, 805, 823, 889, 907, 975, 991
- in /usr/src/bin/tcsh/sh.dol.c line 744
- in /usr/src/bin/tcsh/sh.file.c line 528
- in /usr/src/bin/tcsh/sh.func.c line 1093
- in /usr/src/bin/tcsh/sh.glob.c line 165, 232, 253, 269, 280, 322, 530, 601, 782, 861-864(2)
- in /usr/src/bin/tcsh/sh.hist.c line 95
- in /usr/src/bin/tcsh/sh.lex.c line 168, 217, 1436, 1469
- in /usr/src/bin/tcsh/sh.misc.c line 85, 163, 204, 217, 406
- in /usr/src/bin/tcsh/sh.parse.c line 554
- in /usr/src/bin/tcsh/sh.print.c line 224
- in /usr/src/bin/tcsh/sh.proc.c line 748
- in /usr/src/bin/tcsh/sh.set.c line 492, 540
- in /usr/src/bin/tcsh/tc.alloc.c line 166, 321, 327, 386, 482, 498, 512
- in /usr/src/bin/tcsh/tc.func.c line 428-429(2), 916, 923-927(3), 934-945(6), 957-966(4), 975, 1066, 1099, 1105, 1205
- in /usr/src/bin/tcsh/tc.str.c line 51, 58, 70, 77, 91, 99, 109, 123, 131, 141, 150, 163, 171, 180, 203, 238, 288-292(2), 321, 357, 375
- in /usr/src/bin/tcsh/tw.help.c line 131
- in /usr/src/bin/tcsh/tw.init.c line 76, 107, 114, 139
- in /usr/src/bin/tcsh/tw.parse.c line 834, 841, 855, 1003

speed_t defined in line 72; used 2 times

- in line 316
- in /usr/src/bin/tcsh/ed.init.c line 598

#### Defined macros

_IOCTL_T defined in line 347; used 2 times

- in line 324, 346

_PID_T defined in line 309; used 7 times

- in line 74, 112, 222, 240, 250, 272, 308

_PTR_T defined in line 337; used 4 times

- in line 58, 107, 319, 336

_SIGMASK_T defined in line 342; used 4 times

- in line 54, 117, 194, 341

_SIZE_T defined in line 304; used 12 times

- in line 66, 102, 163, 174, 186, 219, 237, 260, 269, 281, 291, 303

_SPEED_T defined in line 315; used 5 times

- in line 77, 122, 208, 226, 314

__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

- in /usr/src/bin/tcsh/sh.h line 227

Last modified: 1995-01-06 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 985 |