]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/tcsh/sh.types.h
This commit was generated by cvs2svn to compensate for changes in r161863,
[FreeBSD/FreeBSD.git] / contrib / tcsh / sh.types.h
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... 
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. 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.
28  *
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
39  * SUCH DAMAGE.
40  */
41 #ifndef _h_sh_types
42 #define _h_sh_types
43
44
45 /***
46  *** LynxOS 2.1
47  ***/
48 #ifdef Lynx
49 # ifndef _SIGMASK_T
50 #  define _SIGMASK_T
51     typedef long sigmask_t;
52 # endif /* _SIGMASK_T */
53 # ifndef _PID_T
54 #  define _PID_T
55 # endif /* _PID_T */
56 #endif
57
58 /***
59  *** MachTen 
60  ***/
61 #ifdef __MACHTEN__
62 # ifndef _PID_T
63 #  define _PID_T
64 # endif
65 #endif
66
67
68 /***
69  *** Suns running sunos3.x - sunos4.1.x
70  ***/
71 #if (defined(sun) || defined(__sun__)) && SYSVREL == 0
72 /* This used to be long, but lint dissagrees... */
73 # ifndef _SIGMASK_T
74 #  define _SIGMASK_T
75     typedef int sigmask_t;
76 # endif /* _SIGMASK_T */
77 # ifndef _PTR_T
78 #  define _PTR_T 
79 #   ifdef __GNUC__
80     typedef void * ptr_t;
81 #   else
82     typedef char * ptr_t;
83 #   endif /* __GNUC__ */
84 # endif /* _PTR_T */
85 # ifndef __sys_stdtypes_h
86 #  define __sys_stdtypes_h
87 #   ifndef __lucid
88      typedef int pid_t;
89      typedef unsigned int speed_t;
90 #   endif
91 # endif /* __sys_stdtypes.h */
92 # ifndef _PID_T
93 #  define _PID_T
94 # endif /* _PID_T */
95 # ifndef _SPEED_T
96 #  define _SPEED_T
97 # endif /* _SPEED_T */
98 #endif /* (sun || __sun__) && SYSVREL == 0 */
99
100
101 /***
102  *** Hp's running hpux 7.0 or 8.0
103  ***/
104 #ifdef __hpux
105
106 # ifndef _PTR_T
107 #  define _PTR_T 
108     typedef void * ptr_t;
109 # endif /* _PTR_T */
110
111 # ifndef _PID_T
112 #  define _PID_T
113     typedef long pid_t;
114 # endif /* _PID_T */
115
116 # ifndef _SIGMASK_T
117 #  define _SIGMASK_T
118     typedef long sigmask_t;
119 # endif /* _SIGMASK_T */
120   
121 # ifndef _SPEED_T
122    /* I thought POSIX was supposed to protect all typedefs! */
123 #  define _SPEED_T
124 # endif /* _SPEED_T */
125
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();
132 extern pid_t fork();
133 extern void perror();
134 extern void _exit();
135 extern void abort();
136 extern void qsort();
137 extern void free();
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();
144 extern char *sbrk();
145 # endif /* HPUXVERSION < 800 */
146 #endif /* __hpux */
147
148 #if (defined(_MINIX) && !defined(_MINIX_VMD)) || defined(__EMX__) || defined(COHERENT)
149 typedef char * caddr_t;
150 #endif /* (_MINIX && !_MINIX_VMD) || __EMX__ || COHERENT */
151
152 /***
153  *** hp9000s500 running hpux-5.2
154  ***/
155 #ifdef hp9000s500
156 # ifndef _PTR_T
157 #  define _PTR_T
158     typedef char * ptr_t;
159 # endif /* _PTR_T */
160 #endif /* hp9000s500 */
161
162 /***
163  *** Data General AViiON 88000 or Pentium, running dgux 5.4R3 or R4.11
164  ***/
165 #ifdef DGUX
166 # ifndef _PID_T
167 #  define _PID_T
168 # endif /* _PID_T */
169 #endif /* DGUX */
170
171
172 /***
173  *** BSD RENO advertises itself as POSIX, but
174  *** it is missing speed_t 
175  ***/
176 #ifdef RENO
177 # ifndef _SPEED_T
178 #  define _SPEED_T
179    typedef unsigned int speed_t; 
180 # endif /* _SPEED_T */
181 #endif /* RENO */
182
183
184 /***
185  *** NeXT OS 3.x
186  ***/ 
187 #ifdef NeXT
188 # ifndef _SPEED_T
189 #  define _SPEED_T
190    typedef unsigned int speed_t; 
191 # endif /* _SPEED_T */
192 #endif /* NeXT */
193
194 /***
195  *** Utah's HPBSD
196  *** some posix & 4.4 BSD changes (pid_t is a short)
197  ***/
198 #ifdef HPBSD
199 # ifndef _PID_T
200 #  define _PID_T
201 # endif /* _PID_T */
202 #endif /* HPBSD */
203
204
205 /***
206  *** Pyramid, BSD universe
207  *** In addition to the size_t
208  ***/
209 #ifdef pyr
210 # ifndef _PID_T
211 #  define _PID_T
212    typedef short pid_t;
213 # endif /* _PID_T */
214 #endif /* pyr */
215
216
217 /***
218  *** rs6000, ibm370, ps2, rt: running flavors of aix.
219  ***/
220 #ifdef IBMAIX
221 # ifndef aiws
222 #  ifndef _PID_T
223 #   define _PID_T
224 #  endif /* _PID_T */
225 # endif /* !aiws */
226 # ifdef _IBMR2
227 #  ifndef _SPEED_T 
228 #   define _SPEED_T
229 #  endif /* _SPEED_T */
230 # endif /* _IBMR2 */
231 #endif /* IBMAIX */
232
233
234 /***
235  *** Ultrix...
236  ***/
237 #if defined(ultrix) || defined(__ultrix)
238 # ifndef _PID_T
239 #  define _PID_T
240 # endif /* _PID_T */
241 # ifndef _PTR_T
242 #  define _PTR_T
243     typedef void * ptr_t;
244 # endif /* _PTR_T */
245 #endif /* ultrix || __ultrix */
246
247
248 /***
249  *** Silicon graphics IRIS4D running IRIX3_3
250  ***/
251 #if defined(IRIS4D) && defined(IRIX3_3)
252 # ifndef _PID_T
253 #  define _PID_T
254 # endif /* _PID_T */
255 #endif /* IRIS4D && IRIX3_3 */
256
257
258 /***
259  *** Apple AUX.
260  ***/
261 #ifdef OREO
262 # ifndef _PID_T
263 #  define _PID_T
264 # endif /* _PID_T */
265 #endif /* OREO */
266
267 /***
268  *** Concurrent (Masscomp) running RTU 4.1A & RTU 5.0. 
269  **** [RTU 6.0 from mike connor]
270  *** Added, DAS DEC-90.
271  ***/
272 #ifdef  masscomp
273 # ifdef RTU6
274 #  ifndef _PID_T
275 #   define _PID_T
276 #  endif /* _PID_T */
277 #  ifndef _SPEED_T
278 #   define _SPEED_T
279 #  endif /* _SPEED_T */
280 #endif /* RTU6 */
281 #endif  /* masscomp */
282
283 /* 
284  * Motorola MPC running R32V2 (sysV88)
285  */
286 #ifdef sysV88
287 # ifndef _PID_T
288 #  define _PID_T
289 # endif /* _PID_T */
290 #endif /* sysV88 */
291  
292 /* 
293  * Amdahl running UTS (Sys V3)
294  */
295 #ifdef uts
296 # ifndef _PID_T
297 #  define _PID_T
298 # endif /* _PID_T */
299 #endif /* uts */
300
301 /* 
302  * Tektronix XD88/10 running UTekV (Sys V3)
303  */
304 #ifdef UTekV
305 # ifndef _PID_T
306 #  define _PID_T
307 # endif /* _PID_T */
308 #endif /* UTekV*/
309
310 /*
311  * BBN Butterfly gp1000
312  */
313 #ifdef butterfly
314 # ifndef _PID_T
315 #  define _PID_T
316 # endif /* _PID_T */
317 #endif /* butterfly */
318
319 /*
320  * Alliant FX-2800/FX-80
321  */
322 #ifdef alliant
323 # ifndef _PID_T
324 #  define _PID_T
325 # endif /* _PID_T */
326 # ifdef mc68000
327    typedef int   pid_t; /* FX-80 */
328 # else
329    typedef short pid_t; /* FX-2800 */
330 # endif 
331 #endif /* alliant */
332
333 /*
334  * DNIX
335  */
336 #ifdef DNIX
337 # ifndef _PID_T
338 #  define _PID_T
339 # endif /* _PID_T */
340 #endif /* DNIX */
341
342 /*
343  *  Apollo running Domain/OS SR10.3 or greater
344  */
345 #ifdef apollo
346 # ifndef _PID_T
347 #  define _PID_T
348    typedef int pid_t;   /* Older versions might not like that */
349 # endif /* _PID_T */
350 #endif /* apollo */
351
352 /***
353  *** a pdp/11, running 2BSD
354  ***/
355 #ifdef pdp11
356 # ifndef _PID_T
357 #  define _PID_T
358 # endif /* _PID_T */
359 #endif /* pdp11 */
360
361 /***
362  *** a Harris, running CX/UX
363  ***/
364 #ifdef _CX_UX
365 # ifndef _PID_T
366 #  define _PID_T
367 # endif /* _PID_T */
368 #endif /* _CX_UX */
369
370 /***
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!
374  ***/
375
376 #ifndef POSIX
377
378 # ifndef _PID_T
379 #  define _PID_T
380     typedef int pid_t;
381 # endif /* _PID_T */
382
383 # ifndef _SPEED_T
384 #  define _SPEED_T
385     typedef unsigned int speed_t;
386 # endif /* _SPEED_T */
387
388 # ifndef _PTR_T
389 #  define _PTR_T 
390     typedef char * ptr_t;
391 #endif /* _PTR_T */
392
393 # ifndef _IOCTL_T
394 #  define _IOCTL_T
395     typedef char * ioctl_t;     /* Third arg of ioctl */
396 # endif /* _IOCTL_T */
397
398 #endif /* ! POSIX */
399
400
401
402 /***
403  *** This is our own junk types.
404  ***/
405 #ifndef _PTR_T
406 # define _PTR_T 
407     typedef void * ptr_t;
408 #endif /* _PTR_T */
409
410 #ifndef _SIGMASK_T
411 # define _SIGMASK_T
412     typedef int sigmask_t;
413 #endif /* _SIGMASK_T */
414
415 #ifndef _IOCTL_T
416 # define _IOCTL_T
417     typedef void * ioctl_t;     /* Third arg of ioctl */
418 #endif /* _IOCTL_T */
419
420 #endif /* _h_sh_types */