1 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ 2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 3 4 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 5 #define MINSIGSTKSZ 2048 6 #define SIGSTKSZ 8192 7 #endif 8 9 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 10 typedef unsigned long greg_t, gregset_t[38]; 11 typedef struct sigcontext { 12 struct { 13 unsigned long r0, r1, r2, r3, r4, r5, r6, r7; 14 unsigned long r8, r9, r10, r11, r12, r13, r14, r15; 15 unsigned long r16, r17, r18, r19, r20, r21, r22, r23; 16 unsigned long r24, r25, r26, r27, r28, r29, r30, r31; 17 unsigned long pc, msr, ear, esr, fsr; 18 int pt_mode; 19 } regs; 20 unsigned long oldmask; 21 } mcontext_t; 22 #else 23 typedef struct { 24 unsigned long __regs[39]; 25 } mcontext_t; 26 #endif 27 28 struct sigaltstack { 29 void *ss_sp; 30 int ss_flags; 31 size_t ss_size; 32 }; 33 34 typedef struct __ucontext { 35 unsigned long uc_flags; 36 struct __ucontext *uc_link; 37 stack_t uc_stack; 38 mcontext_t uc_mcontext; 39 sigset_t uc_sigmask; 40 } ucontext_t; 41 42 #define SA_NOCLDSTOP 1 43 #define SA_NOCLDWAIT 2 44 #define SA_SIGINFO 4 45 #define SA_ONSTACK 0x08000000 46 #define SA_RESTART 0x10000000 47 #define SA_NODEFER 0x40000000 48 #define SA_RESETHAND 0x80000000 49 50 #endif 51 52 #define SIGHUP 1 53 #define SIGINT 2 54 #define SIGQUIT 3 55 #define SIGILL 4 56 #define SIGTRAP 5 57 #define SIGABRT 6 58 #define SIGIOT SIGABRT 59 #define SIGBUS 7 60 #define SIGFPE 8 61 #define SIGKILL 9 62 #define SIGUSR1 10 63 #define SIGSEGV 11 64 #define SIGUSR2 12 65 #define SIGPIPE 13 66 #define SIGALRM 14 67 #define SIGTERM 15 68 #define SIGSTKFLT 16 69 #define SIGCHLD 17 70 #define SIGCONT 18 71 #define SIGSTOP 19 72 #define SIGTSTP 20 73 #define SIGTTIN 21 74 #define SIGTTOU 22 75 #define SIGURG 23 76 #define SIGXCPU 24 77 #define SIGXFSZ 25 78 #define SIGVTALRM 26 79 #define SIGPROF 27 80 #define SIGWINCH 28 81 #define SIGIO 29 82 #define SIGPOLL 29 83 #define SIGPWR 30 84 #define SIGSYS 31 85 #define SIGUNUSED SIGSYS 86 87 #define _NSIG 65 88