1 /* $Header: /src/pub/tcsh/sh.types.h,v 3.40 2003/06/18 19:32:44 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...
14 * Copyright (c) 1980, 1991 The Regents of the University of California.
15 * All rights reserved.
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
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. Neither the name of the University nor the names of its contributors
26 * may be used to endorse or promote products derived from this software
27 * without specific prior written permission.
29 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 typedef long sigmask_t;
52 # endif /* _SIGMASK_T */
69 *** Suns running sunos3.x - sunos4.1.x
71 #if (defined(sun) || defined(__sun__)) && SYSVREL == 0
72 /* This used to be long, but lint dissagrees... */
75 typedef int sigmask_t;
76 # endif /* _SIGMASK_T */
83 # endif /* __GNUC__ */
88 # ifndef __sys_stdtypes_h
89 # define __sys_stdtypes_h
92 typedef unsigned int speed_t;
94 # endif /* __sys_stdtypes.h */
100 # endif /* _SPEED_T */
112 # endif /* !SUNOS4 */
113 #endif /* (sun || __sun__) && SYSVREL == 0 */
117 *** Hp's running hpux 7.0 or 8.0
122 typedef unsigned int size_t;
123 # endif /* _SIZE_T */
127 typedef void * ptr_t;
137 typedef long sigmask_t;
138 # endif /* _SIGMASK_T */
141 /* I thought POSIX was supposed to protect all typedefs! */
143 # endif /* _SPEED_T */
145 # if HPUXVERSION < 1100 /* XXX: Not true for 11.0 */
146 extern uid_t getuid(), geteuid();
147 extern gid_t getgid(), getegid();
148 extern sigmask_t sigblock();
149 extern sigmask_t sigsetmask();
150 extern pid_t getpid();
152 extern void perror();
157 extern unsigned int alarm();
158 extern unsigned int sleep();
159 # endif /* HPUXVERSION < 1100 */
160 # if HPUXVERSION < 800 /* XXX: Not true for 8.0 */
161 extern void sigpause();
162 extern sigmask_t sigspace();
164 extern int readlink();
165 extern int sigvector();
166 extern int gethostname();
170 # endif /* HPUXVERSION < 800 */
173 #if (defined(_MINIX) && !defined(_MINIX_VMD)) || defined(__EMX__) || defined(COHERENT)
174 typedef char * caddr_t;
175 #endif /* (_MINIX && !_MINIX_VMD) || __EMX__ || COHERENT */
178 *** hp9000s500 running hpux-5.2
183 typedef char * ptr_t;
185 #endif /* hp9000s500 */
188 *** Data General AViiON 88000 or Pentium, running dgux 5.4R3 or R4.11
192 # define _SIZE_T size_t
193 typedef unsigned int size_t;
194 # endif /* _SIZE_T */
202 *** Intel 386, ISC 386/ix v2.0.2
207 # endif /* _SIZE_T */
211 *** a PFU/Fujitsu A-xx computer SX/A Edition 60 or later
216 # endif /* _SIZE_T */
220 *** a stellar 2600, running stellix 2.3
225 # endif /* _SIZE_T */
229 *** BSD systems, pre and post 4.3
234 # endif /* _SIZE_T */
239 *** BSD RENO advertises itself as POSIX, but
240 *** it is missing speed_t
245 typedef unsigned int speed_t;
246 # endif /* _SPEED_T */
256 typedef unsigned int speed_t;
257 # endif /* _SPEED_T */
262 *** some posix & 4.4 BSD changes (pid_t is a short)
272 *** Pyramid, BSD universe
273 *** In addition to the size_t
284 *** rs6000, ibm370, ps2, rt: running flavors of aix.
289 # endif /* _SIZE_T */
298 # endif /* _SPEED_T */
306 #if defined(ultrix) || defined(__ultrix)
309 # endif /* _SIZE_T */
315 typedef void * ptr_t;
317 #endif /* ultrix || __ultrix */
321 *** Silicon graphics IRIS4D running IRIX3_3
323 #if defined(IRIS4D) && defined(IRIX3_3)
327 #endif /* IRIS4D && IRIX3_3 */
336 # endif /* _SIZE_T */
345 # endif /* _SIZE_T */
352 *** Intel 386, Hypercube
357 # endif /* _SIZE_T */
361 *** Concurrent (Masscomp) running RTU 4.1A & RTU 5.0.
362 **** [RTU 6.0 from mike connor]
363 *** Added, DAS DEC-90.
368 # endif /* _SIZE_T */
375 # endif /* _SPEED_T */
377 #endif /* masscomp */
380 *** Encore multimax running umax 4.2
383 # ifdef __TYPES_DOT_H__
386 # endif /* _SIZE_T */
387 # endif /* __TYPES_DOT_H__ */
391 *** Silicon Graphics IRIS 3000
397 # endif /* _SIZE_T */
401 * Motorola MPC running R32V2 (sysV88)
406 # endif /* _SIZE_T */
413 * Amdahl running UTS (Sys V3)
418 # endif /* _SIZE_T */
425 * Tektronix 4300 running UTek 4.0 (BSD 4.2)
430 # endif /* _SIZE_T */
442 * Tektronix XD88/10 running UTekV (Sys V3)
447 # endif /* _SIZE_T */
460 # endif /* _SIZE_T */
461 # endif /* types_h */
470 # endif /* _SIZE_T */
474 * BBN Butterfly gp1000
480 #endif /* butterfly */
486 # if defined(__SIZE_T) && !defined(_SIZE_T)
488 # endif /* __SIZE_T && !_SIZE_T */
492 * Alliant FX-2800/FX-80
499 typedef int pid_t; /* FX-80 */
501 typedef short pid_t; /* FX-2800 */
515 * Apollo running Domain/OS SR10.3 or greater
520 typedef int pid_t; /* Older versions might not like that */
525 * Vax running VMS_POSIX
530 # endif /* _SIZE_T */
531 #endif /* _VMS_POSIX */
534 *** a pdp/11, running 2BSD
543 *** a Harris, running CX/UX
552 *** Catch all for non POSIX and/or non ANSI systems.
553 *** Systems up to spec *should* define these automatically
554 *** I am open to suggestions on how to do this correctly!
561 typedef int size_t; /* As sun comments ??? : meaning I take it */
562 # endif /* _SIZE_T */ /* Until we make the world ANSI... */
564 #endif /* ! __STDC__ */
575 typedef unsigned int speed_t;
576 # endif /* _SPEED_T */
580 typedef char * ptr_t;
585 typedef char * ioctl_t; /* Third arg of ioctl */
586 # endif /* _IOCTL_T */
593 *** This is our own junk types.
597 typedef void * ptr_t;
602 typedef int sigmask_t;
603 #endif /* _SIGMASK_T */
607 typedef void * ioctl_t; /* Third arg of ioctl */
608 #endif /* _IOCTL_T */
610 #endif /* _h_sh_types */