]> git.zerfleddert.de Git - micropolis/blob - src/tcl/compat/testwait.c
Import Micropolis from http://www.donhopkins.com/home/micropolis/
[micropolis] / src / tcl / compat / testwait.c
1 /*
2 * testwait.c --
3 *
4 * This file contains a simple program that will compile
5 * correctly if and only if <sys/wait.h> defines the
6 * type "union wait". It is used during configuration
7 * to determine whether or not to use this type.
8 *
9 * Copyright 1991 Regents of the University of California
10 * Permission to use, copy, modify, and distribute this
11 * software and its documentation for any purpose and without
12 * fee is hereby granted, provided that this copyright
13 * notice appears in all copies. The University of California
14 * makes no representations about the suitability of this
15 * software for any purpose. It is provided "as is" without
16 * express or implied warranty.
17 */
18
19 #ifndef lint
20 static char rcsid[] = "$Header: /user6/ouster/tcl/compat/RCS/testwait.c,v 1.3 91/12/18 13:42:09 ouster Exp $ SPRITE (Berkeley)";
21 #endif /* not lint */
22
23 #include <sys/types.h>
24 #include <sys/wait.h>
25
26 /*
27 * This code is very tricky, mostly because of weirdness in HP-UX
28 * where "union wait" is defined in both the BSD and SYS-V
29 * environments. Supposedly the WIFEXITED business will do the
30 * right thing...
31 */
32
33 union wait x;
34
35 int main()
36 {
37 WIFEXITED(x); /* Generates compiler error if WIFEXITED
38 * uses an int. */
39 return 0;
40 }
Impressum, Datenschutz