1 /* $Header: /src/pub/tcsh/sh.types.h,v 3.39 2002/03/08 17:36:47 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 extern uid_t
getuid(), geteuid();
146 extern gid_t
getgid(), getegid();
147 extern sigmask_t
sigblock();
148 extern sigmask_t
sigsetmask();
149 extern pid_t
getpid();
151 extern void perror();
156 extern unsigned int alarm();
157 extern unsigned int sleep();
158 # if HPUXVERSION < 800 /* XXX: Not true for 8.0 */
159 extern void sigpause();
160 extern sigmask_t
sigspace();
162 extern int readlink();
163 extern int sigvector();
164 extern int gethostname();
168 # endif /* HPUXVERSION < 800 */
171 #if (defined(_MINIX) && !defined(_MINIX_VMD)) || defined(__EMX__) || defined(COHERENT)
172 typedef char * caddr_t
;
173 #endif /* (_MINIX && !_MINIX_VMD) || __EMX__ || COHERENT */
176 *** hp9000s500 running hpux-5.2
181 typedef char * ptr_t
;
183 #endif /* hp9000s500 */
186 *** Data General AViiON 88000 or Pentium, running dgux 5.4R3 or R4.11
190 # define _SIZE_T size_t
191 typedef unsigned int size_t;
192 # endif /* _SIZE_T */
200 *** Intel 386, ISC 386/ix v2.0.2
205 # endif /* _SIZE_T */
209 *** a PFU/Fujitsu A-xx computer SX/A Edition 60 or later
214 # endif /* _SIZE_T */
218 *** a stellar 2600, running stellix 2.3
223 # endif /* _SIZE_T */
227 *** BSD systems, pre and post 4.3
232 # endif /* _SIZE_T */
237 *** BSD RENO advertises itself as POSIX, but
238 *** it is missing speed_t
243 typedef unsigned int speed_t
;
244 # endif /* _SPEED_T */
254 typedef unsigned int speed_t
;
255 # endif /* _SPEED_T */
260 *** some posix & 4.4 BSD changes (pid_t is a short)
270 *** Pyramid, BSD universe
271 *** In addition to the size_t
282 *** rs6000, ibm370, ps2, rt: running flavors of aix.
287 # endif /* _SIZE_T */
296 # endif /* _SPEED_T */
304 #if defined(ultrix) || defined(__ultrix)
307 # endif /* _SIZE_T */
313 typedef void * ptr_t
;
315 #endif /* ultrix || __ultrix */
319 *** Silicon graphics IRIS4D running IRIX3_3
321 #if defined(IRIS4D) && defined(IRIX3_3)
325 #endif /* IRIS4D && IRIX3_3 */
334 # endif /* _SIZE_T */
343 # endif /* _SIZE_T */
350 *** Intel 386, Hypercube
355 # endif /* _SIZE_T */
359 *** Concurrent (Masscomp) running RTU 4.1A & RTU 5.0.
360 **** [RTU 6.0 from mike connor]
361 *** Added, DAS DEC-90.
366 # endif /* _SIZE_T */
373 # endif /* _SPEED_T */
375 #endif /* masscomp */
378 *** Encore multimax running umax 4.2
381 # ifdef __TYPES_DOT_H__
384 # endif /* _SIZE_T */
385 # endif /* __TYPES_DOT_H__ */
389 *** Silicon Graphics IRIS 3000
395 # endif /* _SIZE_T */
399 * Motorola MPC running R32V2 (sysV88)
404 # endif /* _SIZE_T */
411 * Amdahl running UTS (Sys V3)
416 # endif /* _SIZE_T */
423 * Tektronix 4300 running UTek 4.0 (BSD 4.2)
428 # endif /* _SIZE_T */
440 * Tektronix XD88/10 running UTekV (Sys V3)
445 # endif /* _SIZE_T */
458 # endif /* _SIZE_T */
459 # endif /* types_h */
468 # endif /* _SIZE_T */
472 * BBN Butterfly gp1000
478 #endif /* butterfly */
484 # if defined(__SIZE_T) && !defined(_SIZE_T)
486 # endif /* __SIZE_T && !_SIZE_T */
490 * Alliant FX-2800/FX-80
497 typedef int pid_t
; /* FX-80 */
499 typedef short pid_t
; /* FX-2800 */
513 * Apollo running Domain/OS SR10.3 or greater
518 typedef int pid_t
; /* Older versions might not like that */
523 * Vax running VMS_POSIX
528 # endif /* _SIZE_T */
529 #endif /* _VMS_POSIX */
532 *** a pdp/11, running 2BSD
541 *** a Harris, running CX/UX
550 *** Catch all for non POSIX and/or non ANSI systems.
551 *** Systems up to spec *should* define these automatically
552 *** I am open to suggestions on how to do this correctly!
559 typedef int size_t; /* As sun comments ??? : meaning I take it */
560 # endif /* _SIZE_T */ /* Until we make the world ANSI... */
562 #endif /* ! __STDC__ */
573 typedef unsigned int speed_t
;
574 # endif /* _SPEED_T */
578 typedef char * ptr_t
;
583 typedef char * ioctl_t
; /* Third arg of ioctl */
584 # endif /* _IOCTL_T */
591 *** This is our own junk types.
595 typedef void * ptr_t
;
600 typedef int sigmask_t
;
601 #endif /* _SIGMASK_T */
605 typedef void * ioctl_t
; /* Third arg of ioctl */
606 #endif /* _IOCTL_T */
608 #endif /* _h_sh_types */