minor updates to signal implementation

This commit is contained in:
manojampalam 2016-03-20 22:58:37 -07:00
parent 4c2ee5ce43
commit 6af7c19743
3 changed files with 10 additions and 9 deletions

View File

@ -3,13 +3,7 @@
/* Compatibility header to allow code that uses these types to compile on Win32 */
typedef unsigned int uid_t;
typedef unsigned int gid_t;
typedef long _off_t;
typedef long off_t;
typedef unsigned int _dev_t;
typedef unsigned int dev_t; /* device code */
/* device code */
#if defined(__MINGW32__)

View File

@ -2,5 +2,12 @@
#define COMPAT_PARAM_H 1
/* Compatibility header to avoid lots of #ifdef _WIN32's in includes.h */
typedef unsigned int uid_t;
typedef unsigned int gid_t;
typedef long _off_t;
typedef long off_t;
typedef unsigned int _dev_t;
typedef unsigned int dev_t;
#endif

View File

@ -48,7 +48,6 @@ static VOID CALLBACK
sigint_APCProc(
_In_ ULONG_PTR dwParam
) {
pending_signals |= W32_SIGINT;
sigaddset(&pending_signals, W32_SIGINT);
}
@ -65,7 +64,8 @@ void
sw_init_signal_handler_table() {
int i;
signal(SIGINT, sigint_APCProc);
/* TODO SetConsoleCtrlHandler */
//signal(SIGINT, native_sig_handler);
sigemptyset(&pending_signals);
memset(&signal_info, 0, sizeof(signal_info));
for (i = 0; i < W32_SIGMAX; i++) {