diff options
author | Araq <rumpf_a@web.de> | 2013-06-30 22:10:04 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-06-30 22:10:04 +0200 |
commit | 30f8568570462f158e6928c3de8d41ea42cb39fd (patch) | |
tree | 327eb4784df4a88a6afcd960177f68811ac5cf02 /lib/system | |
parent | 1a5e30b0530a4460002b4ef2282498fa24ac8eff (diff) | |
download | Nim-30f8568570462f158e6928c3de8d41ea42cb39fd.tar.gz |
fixes --os:standalone
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/ansi_c.nim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/system/ansi_c.nim b/lib/system/ansi_c.nim index 8c187ab74..a22c2b069 100644 --- a/lib/system/ansi_c.nim +++ b/lib/system/ansi_c.nim @@ -34,9 +34,9 @@ type C_JmpBuf {.importc: "jmp_buf", header: "<setjmp.h>".} = array[0..31, int] var - c_stdin {.importc: "stdin", header: "<stdio.h>".}: C_TextFileStar - c_stdout {.importc: "stdout", header: "<stdio.h>".}: C_TextFileStar - c_stderr {.importc: "stderr", header: "<stdio.h>".}: C_TextFileStar + c_stdin {.importc: "stdin", nodecl.}: C_TextFileStar + c_stdout {.importc: "stdout", nodecl.}: C_TextFileStar + c_stderr {.importc: "stderr", nodecl.}: C_TextFileStar # constants faked as variables: when not defined(SIGINT): @@ -109,8 +109,9 @@ proc c_free(p: pointer) {.importc: "free", header: "<stdlib.h>".} proc c_realloc(p: pointer, newsize: int): pointer {. importc: "realloc", header: "<stdlib.h>".} -when not defined(errno): - var errno {.importc, header: "<errno.h>".}: cint ## error variable +when hostOS != "standalone": + when not defined(errno): + var errno {.importc, header: "<errno.h>".}: cint ## error variable proc strerror(errnum: cint): cstring {.importc, header: "<string.h>".} proc c_remove(filename: CString): cint {. |