diff --git a/src/signals.c b/src/signals.c
index b7d0063..b52aad8 100644
--- a/src/signals.c
+++ b/src/signals.c
@@ -34,8 +34,9 @@
 #include <dos.h>
 #endif

-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
 #include <windows.h>
+#include <wincon.h>
 #endif

 #include "arch.h"
@@ -203,7 +204,7 @@ static void sig_handle_abort(int signum)
        errno = saved_errno;
 }

-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
 static CALLBACK BOOL sig_handle_abort_ctrl(DWORD ctrltype)
 {
        sig_handle_abort(SIGINT);
@@ -217,7 +218,8 @@ static void sig_install_abort(void)
        setcbrk(1);
 #endif

-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
+       SetConsoleCtrlHandler(NULL, FALSE);
        SetConsoleCtrlHandler(sig_handle_abort_ctrl, TRUE);
 #endif

@@ -233,7 +235,7 @@ static void sig_install_abort(void)

 static void sig_remove_abort(void)
 {
-#ifdef __CYGWIN32__
+#ifdef __CYGWIN__
        SetConsoleCtrlHandler(sig_handle_abort_ctrl, FALSE);
 #endif