+#else
+# ifdef WAIT_USES_UNION
+ typedef union wait amwait_t;
+# ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) (((amwait_t*)&(stat_val))->w_retcode)
+# endif
+# ifndef WTERMSIG
+# define WTERMSIG(stat_val) (((amwait_t*)&(stat_val))->w_termsig)
+# endif
+# ifndef WIFEXITED
+# define WIFEXITED(stat_val) (WTERMSIG(stat_val) == 0)
+# endif
+# else
+ typedef int amwait_t;
+# ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) (*(unsigned*)&(stat_val) >> 8)
+# endif
+# ifndef WTERMSIG
+# define WTERMSIG(stat_val) (*(unsigned*)&(stat_val) & 0x7F)
+# endif
+# ifndef WIFEXITED
+# define WIFEXITED(stat_val) ((*(unsigned*)&(stat_val) & 255) == 0)
+# endif
+# endif