diff options
Diffstat (limited to 'next-posix.h')
-rw-r--r-- | next-posix.h | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/next-posix.h b/next-posix.h index 2eb061ac7..511e04434 100644 --- a/next-posix.h +++ b/next-posix.h | |||
@@ -18,14 +18,14 @@ | |||
18 | #undef WIFSTOPPED | 18 | #undef WIFSTOPPED |
19 | #undef WIFSIGNALED | 19 | #undef WIFSIGNALED |
20 | 20 | ||
21 | #define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */ | 21 | #define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */ |
22 | #define WIFEXITED(w) (!((_W_INT(w)) & 0377)) | 22 | #define WIFEXITED(w) (!((_W_INT(w)) & 0377)) |
23 | #define WIFSTOPPED(w) ((_W_INT(w)) & 0100) | 23 | #define WIFSTOPPED(w) ((_W_INT(w)) & 0100) |
24 | #define WIFSIGNALED(w) (!WIFEXITED(x) && !WIFSTOPPED(x)) | 24 | #define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w)) |
25 | #define WEXITSTATUS(w) (int)(WIFEXITED(x) ? ((_W_INT(w) >> 8) & 0377) : -1) | 25 | #define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1) |
26 | #define WTERMSIG(w) (int)(WIFSIGNALED(x) ? (_W_INT(w) & 0177) : -1) | 26 | #define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1) |
27 | #define WCOREFLAG 0x80 | 27 | #define WCOREFLAG 0x80 |
28 | #define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG) | 28 | #define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG) |
29 | 29 | ||
30 | int waitpid(int pid,int *stat_loc,int options); | 30 | int waitpid(int pid,int *stat_loc,int options); |
31 | #define getpgrp() getpgrp(0) | 31 | #define getpgrp() getpgrp(0) |
@@ -38,25 +38,5 @@ int tcsetpgrp(int fd, pid_t pgrp); | |||
38 | speed_t cfgetospeed(const struct termios *t); | 38 | speed_t cfgetospeed(const struct termios *t); |
39 | speed_t cfgetispeed(const struct termios *t); | 39 | speed_t cfgetispeed(const struct termios *t); |
40 | int cfsetospeed(struct termios *t,int speed); | 40 | int cfsetospeed(struct termios *t,int speed); |
41 | |||
42 | /* Sig*() */ | ||
43 | typedef sigset_t; | ||
44 | #define SIG_BLOCK 00 | ||
45 | #define SIG_UNBLOCK 01 | ||
46 | #define SIG_SETMASK 02 | ||
47 | #define SA_RESTART 00 | ||
48 | struct sigaction { | ||
49 | void (*sa_handler)(); | ||
50 | sigset_t sa_mask; | ||
51 | int sa_flags; | ||
52 | }; | ||
53 | |||
54 | int sigemptyset(sigset_t *set); | ||
55 | int sigaddset(sigset_t *set, int signum); | ||
56 | int sigprocmask(int how, const sigset_t *set, sigset_t *oldset); | ||
57 | int sigsuspend(const sigset_t *mask); | ||
58 | int sigaction(int signum,const struct sigaction *act, struct sigaction *oldact); | ||
59 | |||
60 | #endif /* HAVE_NEXT */ | 41 | #endif /* HAVE_NEXT */ |
61 | |||
62 | #endif /* _NEXT_POSIX_H */ | 42 | #endif /* _NEXT_POSIX_H */ |