fix: define SIGTERM on windows, since it is not exported by system/ansi_c there

Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
Christopher Arndt 2025-01-22 23:13:01 +01:00
parent 3b40310afd
commit 2c99d183ba
1 changed files with 4 additions and 2 deletions

View File

@ -1,13 +1,15 @@
import system/ansi_c
export SIG_DFL, SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, SIGTERM
export SIG_DFL, SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV
when not defined(windows):
export SIGPIPE
export SIGPIPE, SIGTERM
var
SIG_IGN* {.importc: "SIG_IGN", header: "<signal.h>".}: cint
SIGHUP* {.importc: "SIGHUP", header: "<signal.h>".}: cint
SIGQUIT* {.importc: "SIGQUIT", header: "<signal.h>".}: cint
else:
const SIGTERM* = cint(15)
type CSighandlerT = proc (a: cint) {.noconv.}