summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-01-22 11:45:12 +0100
committerAraq <rumpf_a@web.de>2019-01-22 11:45:45 +0100
commit458c8270773d7f1bb70797b6bc16df5d54ffb45d (patch)
tree5d820c947dbf8a08088da77b828d4b846e12a8e9
parentced62f330758c3a3a01a613ed9be4023fd65de1d (diff)
downloadNim-458c8270773d7f1bb70797b6bc16df5d54ffb45d.tar.gz
make --define:noSignalHandler compile again
-rw-r--r--lib/system.nim2
-rw-r--r--lib/system/excpt.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim
index d4a86e53b..0241b92e0 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -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
 
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index 3efefead4..e9d251bb4 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -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)