make --define:noSignalHandler compile again

This commit is contained in:
Araq 2019-01-22 11:45:12 +01:00
commit 458c827077
2 changed files with 2 additions and 2 deletions

View file

@ -3463,7 +3463,7 @@ when not defined(JS): #and not defined(nimscript):
## allows you to override the behaviour of your application when CTRL+C ## allows you to override the behaviour of your application when CTRL+C
## is pressed. Only one such hook is supported. ## is pressed. Only one such hook is supported.
when not defined(useNimRtl): when not defined(noSignalHandler) and not defined(useNimRtl):
proc unsetControlCHook*() proc unsetControlCHook*()
## reverts a call to setControlCHook ## reverts a call to setControlCHook

View file

@ -537,7 +537,7 @@ proc setControlCHook(hook: proc () {.noconv.}) =
type SignalHandler = proc (sign: cint) {.noconv, benign.} type SignalHandler = proc (sign: cint) {.noconv, benign.}
c_signal(SIGINT, cast[SignalHandler](hook)) c_signal(SIGINT, cast[SignalHandler](hook))
when not defined(useNimRtl): when not defined(noSignalHandler) and not defined(useNimRtl):
proc unsetControlCHook() = proc unsetControlCHook() =
# proc to unset a hook set by setControlCHook # proc to unset a hook set by setControlCHook
c_signal(SIGINT, signalHandler) c_signal(SIGINT, signalHandler)