summaryrefslogtreecommitdiff
path: root/next-posix.h
diff options
context:
space:
mode:
Diffstat (limited to 'next-posix.h')
-rw-r--r--next-posix.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/next-posix.h b/next-posix.h
index 967332308..b987b09c2 100644
--- a/next-posix.h
+++ b/next-posix.h
@@ -25,7 +25,6 @@
25#define _NEXT_POSIX_H 25#define _NEXT_POSIX_H
26 26
27#ifdef HAVE_NEXT 27#ifdef HAVE_NEXT
28
29#include <sys/dir.h> 28#include <sys/dir.h>
30 29
31/* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */ 30/* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */
@@ -34,28 +33,10 @@
34/* FILE */ 33/* FILE */
35#define O_NONBLOCK 00004 /* non-blocking open */ 34#define O_NONBLOCK 00004 /* non-blocking open */
36 35
37/* WAITPID */
38#undef WIFEXITED
39#undef WIFSTOPPED
40#undef WIFSIGNALED
41
42#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */
43#define WIFEXITED(w) (!((_W_INT(w)) & 0377))
44#define WIFSTOPPED(w) ((_W_INT(w)) & 0100)
45#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
46#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
47#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
48#define WCOREFLAG 0x80
49#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG)
50
51/* Swap out NeXT's BSD wait() for a more POSIX complient one */ 36/* Swap out NeXT's BSD wait() for a more POSIX complient one */
52pid_t posix_wait(int *status); 37pid_t posix_wait(int *status);
53#define wait(a) posix_wait(a) 38#define wait(a) posix_wait(a)
54 39
55/* MISC functions */
56#define setsid() setpgrp(0, getpid())
57pid_t waitpid(int pid, int *stat_loc, int options);
58
59/* TERMCAP */ 40/* TERMCAP */
60int tcgetattr(int fd, struct termios *t); 41int tcgetattr(int fd, struct termios *t);
61int tcsetattr(int fd, int opt, const struct termios *t); 42int tcsetattr(int fd, int opt, const struct termios *t);