Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys correctly define _W_INT ifdef _KERNEL
details: https://anonhg.NetBSD.org/src/rev/239b9c6ea342
branches: trunk
changeset: 552160:239b9c6ea342
user: cl <cl%NetBSD.org@localhost>
date: Sat Sep 20 14:59:56 2003 +0000
description:
correctly define _W_INT ifdef _KERNEL
- kernels where sizeof(u_short) != sizeof(int) were broken otherwise
diffstat:
sys/sys/wait.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 521d6c67d700 -r 239b9c6ea342 sys/sys/wait.h
--- a/sys/sys/wait.h Sat Sep 20 13:04:07 2003 +0000
+++ b/sys/sys/wait.h Sat Sep 20 14:59:56 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wait.h,v 1.20 2003/08/07 16:34:24 agc Exp $ */
+/* $NetBSD: wait.h,v 1.21 2003/09/20 14:59:56 cl Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993, 1994
@@ -45,11 +45,10 @@
* Macros to test the exit status returned by wait
* and extract the relevant values.
*/
-#if !( defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) )
+#if !( defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) ) || defined(_KERNEL)
#define _W_INT(i) (i)
#else
#define _W_INT(w) (*(int *)(void *)&(w)) /* convert union wait to int */
-#define WCOREFLAG 0200
#endif
#define _WSTATUS(x) (_W_INT(x) & 0177)
@@ -60,7 +59,8 @@
#define WTERMSIG(x) (_WSTATUS(x))
#define WIFEXITED(x) (_WSTATUS(x) == 0)
#define WEXITSTATUS(x) ((int)(((unsigned int)_W_INT(x)) >> 8) & 0xff)
-#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) || defined(_KERNEL)
+#define WCOREFLAG 0200
#define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG)
#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
Home |
Main Index |
Thread Index |
Old Index