From b5628647ad1e48d026064e5acc0d8dc0b8021cfa Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Wed, 18 Oct 2000 00:02:25 +0000 Subject: - (bal) Changed from GNU rx to PCRE on suggestion from djm. - (bal) Integrated Sony NEWS-OS patches from NAKAJI Hirouyuki --- news4-posix.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 news4-posix.h (limited to 'news4-posix.h') 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 @@ +/* + * Defines and prototypes specific to News4 system + */ + +#ifndef _NEWS4_POSIX_H +#define _NEWS4_POSIX_H + +#ifdef HAVE_NEWS4 + +#include + +typedef long clock_t; + +/* FILE */ +#define O_NONBLOCK 00004 /* non-blocking open */ + +/* WAITPID */ +#undef WIFEXITED +#undef WIFSTOPPED +#undef WIFSIGNALED + +#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */ +#define WIFEXITED(w) (!((_W_INT(w)) & 0377)) +#define WIFSTOPPED(w) ((_W_INT(w)) & 0100) +#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w)) +#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1) +#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1) +#define WCOREFLAG 0x80 +#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG) + +int waitpid(int pid,int *stat_loc,int options); +#define setsid() setpgrp(0, getpid()) + +#endif /* HAVE_NEWS4 */ +#endif /* _NEWS4_POSIX_H */ -- cgit v1.2.3