summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-30 20:43:42 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-30 20:43:42 +0000
commitbcd2ccc8b7a3ba5b505aec33d0bae3faa6c25204 (patch)
tree870b0f6576cca0cc44c5671845c85fd9e2dff5e3 /sys
parent3d614c5379a28727a8bb5ec638bd75f33d12fe88 (diff)
do an int & unsigned int dance because of shift of signed value; ok miod
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/wait.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/wait.h b/sys/sys/wait.h
index 85558e71c2b..6a0e543c684 100644
--- a/sys/sys/wait.h
+++ b/sys/sys/wait.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wait.h,v 1.12 2005/12/13 00:35:24 millert Exp $ */
+/* $OpenBSD: wait.h,v 1.13 2006/03/30 20:43:41 deraadt Exp $ */
/* $NetBSD: wait.h,v 1.11 1996/04/09 20:55:51 cgd Exp $ */
/*
@@ -56,11 +56,11 @@
#define _WSTOPPED 0177 /* _WSTATUS if process is stopped */
#define _WCONTINUED 0177777 /* process has continued */
#define WIFSTOPPED(x) ((_W_INT(x) & 0xff) == _WSTOPPED)
-#define WSTOPSIG(x) ((_W_INT(x) >> 8) & 0xff)
+#define WSTOPSIG(x) (int)(((unsigned)_W_INT(x) >> 8) & 0xff)
#define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0)
#define WTERMSIG(x) (_WSTATUS(x))
#define WIFEXITED(x) (_WSTATUS(x) == 0)
-#define WEXITSTATUS(x) ((_W_INT(x) >> 8) & 0xff)
+#define WEXITSTATUS(x) (int)(((unsigned)_W_INT(x) >> 8) & 0xff)
#define WIFCONTINUED(x) ((_W_INT(x) & _WCONTINUED) == _WCONTINUED)
#if __XPG_VISIBLE
#define WCOREFLAG 0200