diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-09-01 11:24:30 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-09-01 11:24:30 +0200 |
commit | dcc72ea7a923fad684b0fd72855b3c0fe435db92 (patch) | |
tree | a2c48b31280a29780b044cb65d1bd1c0acd7f0c8 /lib/pure/includes | |
parent | 50666a1f8bc5961ada8e9ecdcd9c3bc9bc8561d0 (diff) | |
download | Nim-dcc72ea7a923fad684b0fd72855b3c0fe435db92.tar.gz |
fix os.nim for Windows
Diffstat (limited to 'lib/pure/includes')
-rw-r--r-- | lib/pure/includes/oserr.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pure/includes/oserr.nim b/lib/pure/includes/oserr.nim index ef3f82628..dbb709f1b 100644 --- a/lib/pure/includes/oserr.nim +++ b/lib/pure/includes/oserr.nim @@ -9,6 +9,9 @@ when not defined(nimscript): proc c_strerror(errnum: cint): cstring {. importc: "strerror", header: "<string.h>".} + when defined(windows): + import winlean + proc osErrorMsg*(): string {.rtl, extern: "nos$1", deprecated.} = ## Retrieves the operating system's error flag, ``errno``. ## On Windows ``GetLastError`` is checked before ``errno``. |