1 #ifndef __libgxx_sys_wait_h 2 3 #include <_G_config.h> 4 5 extern "C" { 6 #ifdef __sys_wait_h_recursive 7 #include_next <sys/wait.h> 8 #else 9 #define __sys_wait_h_recursive 10 11 12 #if _G_HAVE_SYS_WAIT 13 #ifdef VMS 14 #include "GNU_CC_INCLUDE:[sys]wait.h" 15 #else 16 #include_next <sys/wait.h> 17 #endif 18 #else /* !_G_HAVE_SYS_WAIT */ 19 /* Traditional definitions. */ 20 #define WEXITSTATUS(status) (((x) >> 8) & 0xFF) 21 #define WIFSTOPPED(x) (((x) & 0xFF) == 0177) 22 #define WIFEXITED(x) (! WIFSTOPPED(x) && WTERMSIG(x) == 0) 23 #define WIFSIGNALED(x) (! WIFSTOPPED(x) && WTERMSIG(x) != 0) 24 #define WTERMSIG(status) ((x) & 0x7F) 25 #define WSTOPSIG(status) (((x) >> 8) & 0xFF) 26 #endif /* !_G_HAVE_SYS_WAIT */ 27 28 #define __libgxx_sys_wait_h 1 29 30 struct rusage; 31 extern _G_pid_t wait _G_ARGS((int*)); 32 extern _G_pid_t waitpid _G_ARGS((_G_pid_t, int*, int)); 33 extern _G_pid_t wait3 _G_ARGS((int*, int options, struct rusage*)); 34 extern _G_pid_t wait4 _G_ARGS((_G_pid_t, int*, int, struct rusage*)); 35 #endif 36 } 37 38 #endif 39