summaryrefslogtreecommitdiff
path: root/news4-posix.h
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-10-18 00:02:25 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-10-18 00:02:25 +0000
commitb5628647ad1e48d026064e5acc0d8dc0b8021cfa (patch)
tree645c6dc3a5b3b0e24ec4f7308e9fc1b7823bb0fa /news4-posix.h
parent2594de81d301188108c1accbd4f937a86d70db1c (diff)
- (bal) Changed from GNU rx to PCRE on suggestion from djm.
- (bal) Integrated Sony NEWS-OS patches from NAKAJI Hirouyuki <nakaji@tutrp.tut.ac.jp>
Diffstat (limited to 'news4-posix.h')
-rw-r--r--news4-posix.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/news4-posix.h b/news4-posix.h
new file mode 100644
index 000000000..874067934
--- /dev/null
+++ b/news4-posix.h
@@ -0,0 +1,35 @@
1/*
2 * Defines and prototypes specific to News4 system
3 */
4
5#ifndef _NEWS4_POSIX_H
6#define _NEWS4_POSIX_H
7
8#ifdef HAVE_NEWS4
9
10#include <sys/wait.h>
11
12typedef long clock_t;
13
14/* FILE */
15#define O_NONBLOCK 00004 /* non-blocking open */
16
17/* WAITPID */
18#undef WIFEXITED
19#undef WIFSTOPPED
20#undef WIFSIGNALED
21
22#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */
23#define WIFEXITED(w) (!((_W_INT(w)) & 0377))
24#define WIFSTOPPED(w) ((_W_INT(w)) & 0100)
25#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
26#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
27#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
28#define WCOREFLAG 0x80
29#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG)
30
31int waitpid(int pid,int *stat_loc,int options);
32#define setsid() setpgrp(0, getpid())
33
34#endif /* HAVE_NEWS4 */
35#endif /* _NEWS4_POSIX_H */