remove system/ansi_c include from os

This commit is contained in:
Jacek Sieka 2016-06-05 20:16:26 +08:00
commit fe2b39f007
5 changed files with 19 additions and 31 deletions

View file

@ -26,7 +26,6 @@ elif defined(posix):
else:
{.error: "OS module not ported to your operating system!".}
include "system/ansi_c"
include ospaths
when defined(posix):
@ -37,6 +36,21 @@ when defined(posix):
var
pathMax {.importc: "PATH_MAX", header: "<stdlib.h>".}: cint
proc c_remove(filename: cstring): cint {.
importc: "remove", header: "<stdio.h>".}
proc c_rename(oldname, newname: cstring): cint {.
importc: "rename", header: "<stdio.h>".}
proc c_system(cmd: cstring): cint {.
importc: "system", header: "<stdlib.h>".}
proc c_strerror(errnum: cint): cstring {.
importc: "strerror", header: "<string.h>".}
proc c_strlen(a: cstring): cint {.
importc: "strlen", header: "<string.h>", noSideEffect.}
proc c_getenv(env: cstring): cstring {.
importc: "getenv", header: "<stdlib.h>".}
proc c_putenv(env: cstring): cint {.
importc: "putenv", header: "<stdlib.h>".}
proc osErrorMsg*(): string {.rtl, extern: "nos$1", deprecated.} =
## Retrieves the operating system's error flag, ``errno``.
## On Windows ``GetLastError`` is checked before ``errno``.