GNU Binutils with patches for OS216
Revision | 16423a4a99210a59fc20ea069a5305ccee9414a5 (tree) |
---|---|
Zeit | 1991-03-26 07:25:13 |
Autor | K. Richard Pixley <rich@cygn...> |
Commiter | K. Richard Pixley |
This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
@@ -0,0 +1,27 @@ | ||
1 | + | |
2 | +/* Define how to access the structure that the wait system call stores. | |
3 | + On many systems, there is a structure defined for this. | |
4 | + But on vanilla-ish USG systems there is not. */ | |
5 | + | |
6 | +#ifndef HAVE_WAIT_STRUCT | |
7 | +#define WAITTYPE int | |
8 | +#define WIFSTOPPED(w) (((w)&0377) == 0177) | |
9 | +#define WIFSIGNALED(w) (((w)&0377) != 0177 && ((w)&~0377) == 0) | |
10 | +#define WIFEXITED(w) (((w)&0377) == 0) | |
11 | +#define WRETCODE(w) ((w) >> 8) | |
12 | +#define WSTOPSIG(w) ((w) >> 8) | |
13 | +#define WCOREDUMP(w) (((w)&0200) != 0) | |
14 | +#define WTERMSIG(w) ((w) & 0177) | |
15 | +#define WSETEXIT(w, status) ((w) = (status)) | |
16 | +#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8))) | |
17 | +#else | |
18 | +#include <sys/wait.h> | |
19 | +#define WAITTYPE union wait | |
20 | +#define WRETCODE(w) (w).w_retcode | |
21 | +#define WSTOPSIG(w) (w).w_stopsig | |
22 | +#define WCOREDUMP(w) (w).w_coredump | |
23 | +#define WTERMSIG(w) (w).w_termsig | |
24 | +#define WSETEXIT(w, status) ((w).w_status = (status)) | |
25 | +#define WSETSTOP(w,sig) \ | |
26 | + ((w).w_stopsig = (sig), (w).w_coredump = 0, (w).w_termsig = 0177) | |
27 | +#endif |