summary refs log tree commit diff stats
path: root/lib/system/excpt.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-02-28 19:56:41 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-02-28 19:56:41 +0100
commit38dee2095c3b04e0f6eb8e5e9751ab7b4755d3e8 (patch)
tree2575438b6bb9016592186d19456a91e9c9205264 /lib/system/excpt.nim
parent7ae45ea4202a71df134dbe0ca74c0b944dc1f48a (diff)
downloadNim-38dee2095c3b04e0f6eb8e5e9751ab7b4755d3e8.tar.gz
added 'sig' feature; removed tfShared support in the compiler
Diffstat (limited to 'lib/system/excpt.nim')
-rw-r--r--lib/system/excpt.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index 8d1e04b8d..948f87410 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -316,7 +316,7 @@ when defined(endb):
     dbgAborting: bool # whether the debugger wants to abort
 
 when not defined(noSignalHandler):
-  proc signalHandler(sig: cint) {.exportc: "signalHandler", noconv.} =
+  proc signalHandler(sign: cint) {.exportc: "signalHandler", noconv.} =
     template processSignal(s, action: expr) {.immediate,  dirty.} =
       if s == SIGINT: action("SIGINT: Interrupted by Ctrl-C.\n")
       elif s == SIGSEGV:
@@ -342,13 +342,13 @@ when not defined(noSignalHandler):
       GC_disable()
       var buf = newStringOfCap(2000)
       rawWriteStackTrace(buf)
-      processSignal(sig, buf.add) # nice hu? currying a la Nim :-)
+      processSignal(sign, buf.add) # nice hu? currying a la Nim :-)
       showErrorMessage(buf)
       GC_enable()
     else:
       var msg: cstring
       template asgn(y: expr) = msg = y
-      processSignal(sig, asgn)
+      processSignal(sign, asgn)
       showErrorMessage(msg)
     when defined(endb): dbgAborting = true
     quit(1) # always quit when SIGABRT
@@ -367,6 +367,6 @@ when not defined(noSignalHandler):
 
 proc setControlCHook(hook: proc () {.noconv.} not nil) =
   # ugly cast, but should work on all architectures:
-  type SignalHandler = proc (sig: cint) {.noconv, benign.}
+  type SignalHandler = proc (sign: cint) {.noconv, benign.}
   {.deprecated: [TSignalHandler: SignalHandler].}
   c_signal(SIGINT, cast[SignalHandler](hook))