diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-09-11 17:27:47 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-09-11 17:27:47 +0200 |
commit | f7d1902043c1bc70ba0bb159a3e8c71b78947ad7 (patch) | |
tree | 96adf0fef3b9f1af4b318c1b639797dcca185874 /lib/system/ansi_c.nim | |
parent | 0495e6cf3a1cf0f5f71622a8408d24fbc27642a0 (diff) | |
parent | af94946517d4e07e91b5c5ca21d58645f6da86c4 (diff) | |
download | Nim-f7d1902043c1bc70ba0bb159a3e8c71b78947ad7.tar.gz |
fixes merge conflicts
Diffstat (limited to 'lib/system/ansi_c.nim')
-rw-r--r-- | lib/system/ansi_c.nim | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/system/ansi_c.nim b/lib/system/ansi_c.nim index 0bac979e7..67e42c0af 100644 --- a/lib/system/ansi_c.nim +++ b/lib/system/ansi_c.nim @@ -25,6 +25,11 @@ proc c_memset(p: pointer, value: cint, size: csize): pointer {. importc: "memset", header: "<string.h>", discardable.} proc c_strcmp(a, b: cstring): cint {. importc: "strcmp", header: "<string.h>", noSideEffect.} +proc c_strlen(a: cstring): csize {. + importc: "strlen", header: "<string.h>", noSideEffect.} +proc c_abort() {. + importc: "abort", header: "<stdlib.h>", noSideEffect.} + when defined(linux) and defined(amd64): type @@ -45,7 +50,7 @@ when defined(windows): SIGTERM = cint(15) elif defined(macosx) or defined(linux) or defined(freebsd) or defined(openbsd) or defined(netbsd) or defined(solaris) or - defined(dragonfly): + defined(dragonfly) or defined(nintendoswitch) or defined(genode): const SIGABRT = cint(6) SIGFPE = cint(8) @@ -54,6 +59,15 @@ elif defined(macosx) or defined(linux) or defined(freebsd) or SIGSEGV = cint(11) SIGTERM = cint(15) SIGPIPE = cint(13) +elif defined(haiku): + const + SIGABRT = cint(6) + SIGFPE = cint(8) + SIGILL = cint(4) + SIGINT = cint(2) + SIGSEGV = cint(11) + SIGTERM = cint(15) + SIGPIPE = cint(7) else: when NoFakeVars: {.error: "SIGABRT not ported to your platform".} @@ -69,6 +83,8 @@ else: when defined(macosx): const SIGBUS = cint(10) +elif defined(haiku): + const SIGBUS = cint(30) else: template SIGBUS: untyped = SIGSEGV |