summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-06-01 21:07:10 +0000
committermike <mike@FreeBSD.org>2002-06-01 21:07:10 +0000
commitfad7fa316aaf225f76d38da991f075efdf91e401 (patch)
treedab60d8606e4fb204eee2feecf6ab1329ae5edd7 /sys
parent28ce0e9ae5ca58a90e2e52846a87c830adc3e80f (diff)
downloadFreeBSD-src-fad7fa316aaf225f76d38da991f075efdf91e401.zip
FreeBSD-src-fad7fa316aaf225f76d38da991f075efdf91e401.tar.gz
Be more strict about namespaces.
Submitted by: wollman (mostly)
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/wait.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/sys/wait.h b/sys/sys/wait.h
index 0d21fc0..b093b64 100644
--- a/sys/sys/wait.h
+++ b/sys/sys/wait.h
@@ -46,11 +46,11 @@
* Macros to test the exit status returned by wait and extract the relevant
* values.
*/
-#ifdef _POSIX_SOURCE
-#define _W_INT(i) (i)
-#else
+#if __BSD_VISIBLE
#define _W_INT(w) (*(int *)&(w)) /* Convert union wait to int. */
#define WCOREFLAG 0200
+#else
+#define _W_INT(i) (i)
#endif
#define _WSTATUS(x) (_W_INT(x) & 0177)
@@ -62,7 +62,7 @@
#define WIFEXITED(x) (_WSTATUS(x) == 0)
#define WEXITSTATUS(x) (_W_INT(x) >> 8)
#define WIFCONTINUED(x) (x == 0x13) /* 0x13 == SIGCONT */
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
#define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG)
#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
@@ -81,9 +81,12 @@
#define WNOHANG 1 /* Don't hang in wait. */
#define WUNTRACED 2 /* Tell about stopped, untraced children. */
#define WCONTINUED 4 /* Report a job control continued process. */
+
+#if __BSD_VISIBLE
#define WLINUXCLONE 0x80000000 /* Wait for kthread spawned from linux_clone. */
+#endif
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
/* POSIX extensions and 4.2/4.3 compatibility: */
/*
@@ -143,7 +146,7 @@ union wait {
#define w_stopsig w_S.w_Stopsig
#define WSTOPPED _WSTOPPED
-#endif /* _POSIX_SOURCE */
+#endif /* __BSD_VISIBLE */
#ifndef _KERNEL
#include <sys/types.h>
@@ -154,11 +157,11 @@ struct rusage; /* forward declaration */
pid_t wait(int *);
pid_t waitpid(pid_t, int *, int);
-#ifndef _POSIX_SOURCE
+#if __BSD_VISIBLE
pid_t wait3(int *, int, struct rusage *);
pid_t wait4(pid_t, int *, int, struct rusage *);
#endif
__END_DECLS
#endif
-#endif
+#endif /* !_SYS_WAIT_H_ */
OpenPOWER on IntegriCloud