aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdb_wait.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdb_wait.h')
-rw-r--r--gdb/gdb_wait.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/gdb_wait.h b/gdb/gdb_wait.h
index d0f94f3..36e797b 100644
--- a/gdb/gdb_wait.h
+++ b/gdb/gdb_wait.h
@@ -86,11 +86,19 @@
#endif
#ifndef WSETEXIT
+# ifdef W_EXITCODE
+#define WSETEXIT(w,status) ((w) = W_EXITCODE(status,0))
+# else
#define WSETEXIT(w,status) ((w) = (0 | ((status) << 8)))
+# endif
#endif
#ifndef WSETSTOP
+# ifdef W_STOPCODE
+#define WSETSTOP(w,status) ((w) = W_STOPCODE(status,0))
+# else
#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8)))
+# endif
#endif
/*