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