make --define:noSignalHandler compile again
This commit is contained in:
parent
ced62f3307
commit
458c827077
2 changed files with 2 additions and 2 deletions
|
|
@ -3463,7 +3463,7 @@ when not defined(JS): #and not defined(nimscript):
|
|||
## allows you to override the behaviour of your application when CTRL+C
|
||||
## is pressed. Only one such hook is supported.
|
||||
|
||||
when not defined(useNimRtl):
|
||||
when not defined(noSignalHandler) and not defined(useNimRtl):
|
||||
proc unsetControlCHook*()
|
||||
## reverts a call to setControlCHook
|
||||
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ proc setControlCHook(hook: proc () {.noconv.}) =
|
|||
type SignalHandler = proc (sign: cint) {.noconv, benign.}
|
||||
c_signal(SIGINT, cast[SignalHandler](hook))
|
||||
|
||||
when not defined(useNimRtl):
|
||||
when not defined(noSignalHandler) and not defined(useNimRtl):
|
||||
proc unsetControlCHook() =
|
||||
# proc to unset a hook set by setControlCHook
|
||||
c_signal(SIGINT, signalHandler)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue