diff --git a/src/atimer.c b/src/atimer.c index c26904e1f01..18301120ffe 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -18,6 +18,10 @@ along with GNU Emacs. If not, see . */ #include +#ifdef WINDOWSNT +#define raise(s) w32_raise(s) +#endif + #include "lisp.h" #include "keyboard.h" #include "syssignal.h" diff --git a/src/w32proc.c b/src/w32proc.c index 781a19f480f..7acfba64d70 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -63,6 +63,8 @@ along with GNU Emacs. If not, see . */ #include "w32term.h" #include "coding.h" +void w32_raise (int); + #define RVA_TO_PTR(var,section,filedata) \ ((void *)((section)->PointerToRawData \ + ((DWORD_PTR)(var) - (section)->VirtualAddress) \ @@ -311,6 +313,21 @@ sigismember (const sigset_t *set, int signo) return (*set & (1U << signo)) != 0; } +/* A fuller emulation of 'raise', which supports signals that MS + runtime doesn't know about. */ +void +w32_raise (int signo) +{ + if (!(signo == SIGCHLD || signo == SIGALRM || signo == SIGPROF)) + raise (signo); + + /* Call the handler directly for the signals that we handle + ourselves. */ + signal_handler handler = sig_handlers[signo]; + if (!(handler == SIG_DFL || handler == SIG_IGN || handler == SIG_ERR)) + handler (signo); +} + pid_t getpgrp (void) {