fix os.nim for Windows
This commit is contained in:
parent
50666a1f8b
commit
dcc72ea7a9
1 changed files with 3 additions and 0 deletions
|
|
@ -9,6 +9,9 @@ when not defined(nimscript):
|
||||||
proc c_strerror(errnum: cint): cstring {.
|
proc c_strerror(errnum: cint): cstring {.
|
||||||
importc: "strerror", header: "<string.h>".}
|
importc: "strerror", header: "<string.h>".}
|
||||||
|
|
||||||
|
when defined(windows):
|
||||||
|
import winlean
|
||||||
|
|
||||||
proc osErrorMsg*(): string {.rtl, extern: "nos$1", deprecated.} =
|
proc osErrorMsg*(): string {.rtl, extern: "nos$1", deprecated.} =
|
||||||
## Retrieves the operating system's error flag, ``errno``.
|
## Retrieves the operating system's error flag, ``errno``.
|
||||||
## On Windows ``GetLastError`` is checked before ``errno``.
|
## On Windows ``GetLastError`` is checked before ``errno``.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue