1 #ifndef _ADAPT_SIGNAL_H 2 #define _ADAPT_SIGNAL_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #include <sys/features.h> 9 #include <sys/types.h> 10 11 #define siginfo_t __siginfo_t_discard 12 #include <sys/signal.h> 13 #undef siginfo_t 14 15 #include_next <signal.h> 16 17 #define CLD_EXITED 1 18 #define CLD_KILLED 2 19 #define CLD_DUMPED 3 20 #define CLD_TRAPPED 4 21 #define CLD_STOPPED 5 22 #define CLD_CONTINUED 6 23 24 typedef struct { 25 int si_signo, si_errno, si_code; 26 union { 27 char __pad[128 - 2*sizeof(int) - sizeof(long)]; 28 struct { 29 union { 30 struct { 31 pid_t si_pid; 32 uid_t si_uid; 33 } __piduid; 34 struct { 35 int si_timerid; 36 int si_overrun; 37 } __timer; 38 } __first; 39 union { 40 union sigval si_value; 41 struct { 42 int si_status; 43 clock_t si_utime, si_stime; 44 } __sigchld; 45 } __second; 46 } __si_common; 47 } __si_fields; 48 } siginfo_t; 49 #define si_pid __si_fields.__si_common.__first.__piduid.si_pid 50 #define si_uid __si_fields.__si_common.__first.__piduid.si_uid 51 #define si_status __si_fields.__si_common.__second.__sigchld.si_status 52 #define si_utime __si_fields.__si_common.__second.__sigchld.si_utime 53 #define si_stime __si_fields.__si_common.__second.__sigchld.si_stime 54 #define si_value __si_fields.__si_common.__second.si_value 55 #define si_timerid __si_fields.__si_common.__first.__timer.si_timerid 56 #define si_overrun __si_fields.__si_common.__first.__timer.si_overrun 57 58 #define _NSIG 65 59 #define SIGRTMIN 35 60 #define SIGRTMAX (_NSIG - 1) 61 62 #ifdef __cplusplus 63 } 64 #endif 65 66 #endif 67