1 // This is an incomplete & imprecice implementation of the Posix 2 // standard file by the same name 3 #ifndef __MINGW_SIGNAL__ 4 #define __MINGW_SIGNAL__ 5 6 #ifdef MINGW // Only for cross compilation to mingw 7 8 // Posix is a superset of the ISO C signal.h 9 // include ISO C version first 10 #include_next <signal.h> 11 #include <sys/types.h> 12 #include <sys/ucontext.h> 13 14 #if defined(UNW_TARGET_X86_64) 15 # define SIZEOF_SIGINFO 128 16 #elif defined(UNW_TARGET_ARM64) 17 # define SIZEOF_SIGINFO 128 18 #elif defined(UNW_TARGET_ARM) 19 # define SIZEOF_SIGINFO 128 20 #elif !defined(SIZEOF_SIGINFO) 21 // It is not clear whether the sizeof(siginfo_t) is important 22 // While compiling on Windows the members are not referenced... 23 // However the size maybe important during a case or a memcpy 24 // Barring a full audit it could be important so require the size to be defined 25 # error SIZEOF_SIGINFO is unknown for this target 26 #endif 27 28 typedef struct siginfo 29 { 30 uint8_t content[SIZEOF_SIGINFO]; 31 } siginfo_t; 32 33 typedef long sigset_t; 34 35 int sigfillset(sigset_t *set); 36 37 #endif // MINGW 38 #endif