+/*
+ * [XSI] The type idtype_t shall be defined as an enumeration type whose
+ * possible values shall include at least P_ALL, P_PID, and P_PGID.
+ */
+typedef enum {
+ P_ALL,
+ P_PID,
+ P_PGID
+} idtype_t;
+
+/*
+ * [XSI] The id_t and pid_t types shall be defined as described
+ * in <sys/types.h>
+ */
+#ifndef _PID_T
+typedef __darwin_pid_t pid_t;
+#define _PID_T
+#endif
+
+#ifndef _ID_T
+typedef __darwin_id_t id_t;
+#define _ID_T
+#endif
+
+/*
+ * [XSI] The siginfo_t type shall be defined as described in <signal.h>
+ * [XSI] The rusage structure shall be defined as described in <sys/resource.h>
+ * [XSI] Inclusion of the <sys/wait.h> header may also make visible all
+ * symbols from <signal.h> and <sys/resource.h>
+ *
+ * NOTE: This requirement is currently being satisfied by the direct
+ * inclusion of <sys/signal.h> and <sys/resource.h>, below.
+ *
+ * Software should not depend on the exposure of anything other
+ * than the types siginfo_t and struct rusage as a result of
+ * this inclusion. If you depend on any types or manifest
+ * values othe than siginfo_t and struct rusage from either of
+ * those files, you should explicitly include them yourself, as
+ * well, or in future releases your stware may not compile
+ * without modification.
+ */
+#include <sys/signal.h> /* [XSI] for siginfo_t */
+#include <sys/resource.h> /* [XSI] for struct rusage */
+
+/*
+ * Option bits for the third argument of wait4. WNOHANG causes the
+ * wait to not hang if there are no stopped or terminated processes, rather
+ * returning an error indication in this case (pid==0). WUNTRACED
+ * indicates that the caller should receive status about untraced children
+ * which stop due to signals. If children are stopped and a wait without
+ * this option is done, it is as though they were still running... nothing
+ * about them is returned.
+ */
+#define WNOHANG 0x01 /* [XSI] don't hang in wait/no child to reap */
+#define WUNTRACED 0x02 /* [XSI] notify on stopped, untraced children */
+