summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/include/stdlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/include/stdlib.h')
-rw-r--r--mdk-stage1/dietlibc/include/stdlib.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/include/stdlib.h b/mdk-stage1/dietlibc/include/stdlib.h
index 90f2fbbb7..c5fea2608 100644
--- a/mdk-stage1/dietlibc/include/stdlib.h
+++ b/mdk-stage1/dietlibc/include/stdlib.h
@@ -33,5 +33,12 @@ void exit(int);
extern char **environ;
+#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
+#define WIFSIGNALED(status) (!WIFSTOPPED(status) && !WIFEXITED(status))
+#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
+#define WTERMSIG(status) ((status) & 0x7f)
+#define WSTOPSIG(status) WEXITSTATUS(status)
+#define WIFEXITED(status) (WTERMSIG(status) == 0)
+
#endif