summaryrefslogtreecommitdiff
path: root/next-posix.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-07-09 23:26:27 +1000
committerDamien Miller <djm@mindrot.org>2000-07-09 23:26:27 +1000
commit31abc9addbf23675eb094638c83c6279437b6a50 (patch)
treeac10a4aab8b155fef8dd81072a5213327496d347 /next-posix.h
parentf9b625c36e3dea521c02919e90ac2ddcfd19b06a (diff)
- (djm) More NeXT compatibility from Ben Lindstrom <mouring@pconline.com>
Including sigaction() et al. replacements
Diffstat (limited to 'next-posix.h')
-rw-r--r--next-posix.h34
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
30int waitpid(int pid,int *stat_loc,int options); 30int 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);
38speed_t cfgetospeed(const struct termios *t); 38speed_t cfgetospeed(const struct termios *t);
39speed_t cfgetispeed(const struct termios *t); 39speed_t cfgetispeed(const struct termios *t);
40int cfsetospeed(struct termios *t,int speed); 40int cfsetospeed(struct termios *t,int speed);
41
42/* Sig*() */
43typedef sigset_t;
44#define SIG_BLOCK 00
45#define SIG_UNBLOCK 01
46#define SIG_SETMASK 02
47#define SA_RESTART 00
48struct sigaction {
49 void (*sa_handler)();
50 sigset_t sa_mask;
51 int sa_flags;
52};
53
54int sigemptyset(sigset_t *set);
55int sigaddset(sigset_t *set, int signum);
56int sigprocmask(int how, const sigset_t *set, sigset_t *oldset);
57int sigsuspend(const sigset_t *mask);
58int 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 */