added a bunch of hostOS standalone conditions
This commit is contained in:
parent
7dd9dbe4dd
commit
36b00a107c
3 changed files with 826 additions and 787 deletions
|
|
@ -7,10 +7,13 @@
|
|||
# distribution, for details about the copyright.
|
||||
#
|
||||
|
||||
when defined(arduino):
|
||||
include "system/arduino"
|
||||
|
||||
# Bare-bones implementation of some things for embedded targets.
|
||||
|
||||
proc writeToStdErr(msg: CString) = write(stdout, msg)
|
||||
when not defined(arduino):
|
||||
proc writeToStdErr(msg: CString) = write(stdout, msg)
|
||||
|
||||
proc chckIndx(i, a, b: int): int {.inline, compilerproc.}
|
||||
proc chckRange(i, a, b: int): int {.inline, compilerproc.}
|
||||
|
|
@ -42,11 +45,6 @@ proc reraiseException() {.compilerRtl.} =
|
|||
|
||||
proc WriteStackTrace() = nil
|
||||
|
||||
proc setControlCHook(hook: proc () {.noconv.}) =
|
||||
# ugly cast, but should work on all architectures:
|
||||
type TSignalHandler = proc (sig: cint) {.noconv.}
|
||||
c_signal(SIGINT, cast[TSignalHandler](hook))
|
||||
|
||||
proc raiseRangeError(val: biggestInt) {.compilerproc, noreturn, noinline.} =
|
||||
writeToStdErr("value out of range")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue