1 /* $Header: /src/pub/tcsh/sh.types.h,v 3.42 2005/03/03 19:57:07 kim 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__ */
85 # ifndef __sys_stdtypes_h
86 # define __sys_stdtypes_h
89 typedef unsigned int speed_t;
91 # endif /* __sys_stdtypes.h */
97 # endif /* _SPEED_T */
98 #endif /* (sun || __sun__) && SYSVREL == 0 */
102 *** Hp's running hpux 7.0 or 8.0
108 typedef void * ptr_t;
118 typedef long sigmask_t;
119 # endif /* _SIGMASK_T */
122 /* I thought POSIX was supposed to protect all typedefs! */
124 # endif /* _SPEED_T */
126 # if HPUXVERSION < 1100 /* XXX: Not true for 11.0 */
127 extern uid_t getuid(), geteuid();
128 extern gid_t getgid(), getegid();
129 extern sigmask_t sigblock();
130 extern sigmask_t sigsetmask();
131 extern pid_t getpid();
133 extern void perror();
138 extern unsigned int alarm();
139 extern unsigned int sleep();
140 # endif /* HPUXVERSION < 1100 */
141 # if HPUXVERSION < 800 /* XXX: Not true for 8.0 */
142 extern void sigpause();
143 extern sigmask_t sigspace();
145 # endif /* HPUXVERSION < 800 */
148 #if (defined(_MINIX) && !defined(_MINIX_VMD)) || defined(__EMX__) || defined(COHERENT)
149 typedef char * caddr_t;
150 #endif /* (_MINIX && !_MINIX_VMD) || __EMX__ || COHERENT */
153 *** hp9000s500 running hpux-5.2
158 typedef char * ptr_t;
160 #endif /* hp9000s500 */
163 *** Data General AViiON 88000 or Pentium, running dgux 5.4R3 or R4.11
173 *** BSD RENO advertises itself as POSIX, but
174 *** it is missing speed_t
179 typedef unsigned int speed_t;
180 # endif /* _SPEED_T */
190 typedef unsigned int speed_t;
191 # endif /* _SPEED_T */
196 *** some posix & 4.4 BSD changes (pid_t is a short)
206 *** Pyramid, BSD universe
207 *** In addition to the size_t
218 *** rs6000, ibm370, ps2, rt: running flavors of aix.
229 # endif /* _SPEED_T */
237 #if defined(ultrix) || defined(__ultrix)
243 typedef void * ptr_t;
245 #endif /* ultrix || __ultrix */
249 *** Silicon graphics IRIS4D running IRIX3_3
251 #if defined(IRIS4D) && defined(IRIX3_3)
255 #endif /* IRIS4D && IRIX3_3 */
268 *** Concurrent (Masscomp) running RTU 4.1A & RTU 5.0.
269 **** [RTU 6.0 from mike connor]
270 *** Added, DAS DEC-90.
279 # endif /* _SPEED_T */
281 #endif /* masscomp */
284 * Motorola MPC running R32V2 (sysV88)
293 * Amdahl running UTS (Sys V3)
302 * Tektronix XD88/10 running UTekV (Sys V3)
311 * BBN Butterfly gp1000
317 #endif /* butterfly */
320 * Alliant FX-2800/FX-80
327 typedef int pid_t; /* FX-80 */
329 typedef short pid_t; /* FX-2800 */
343 * Apollo running Domain/OS SR10.3 or greater
348 typedef int pid_t; /* Older versions might not like that */
353 *** a pdp/11, running 2BSD
362 *** a Harris, running CX/UX
371 *** Catch all for non POSIX and/or non ANSI systems.
372 *** Systems up to spec *should* define these automatically
373 *** I am open to suggestions on how to do this correctly!
385 typedef unsigned int speed_t;
386 # endif /* _SPEED_T */
390 typedef char * ptr_t;
395 typedef char * ioctl_t; /* Third arg of ioctl */
396 # endif /* _IOCTL_T */
403 *** This is our own junk types.
407 typedef void * ptr_t;
412 typedef int sigmask_t;
413 #endif /* _SIGMASK_T */
417 typedef void * ioctl_t; /* Third arg of ioctl */
418 #endif /* _IOCTL_T */
420 #endif /* _h_sh_types */