move widestrs out of system (#20462)

* move widestrs out of system

* fix osproc
This commit is contained in:
metagn 2022-10-01 23:35:09 +03:00 • committed by GitHub
commit 0b1650576c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 64 additions and 8 deletions

View file

@ -43,6 +43,8 @@ when not defined(nimscript):
else:
when defined(windows):
when defined(nimPreviewSlimSystem):
import std/widestrs
proc c_putenv(envstring: cstring): cint {.importc: "_putenv", header: "<stdlib.h>".}
from std/private/win_setenv import setEnvImpl
proc c_wgetenv(varname: WideCString): WideCString {.importc: "_wgetenv",

View file

@ -11,6 +11,8 @@ when not defined(nimscript):
when defined(windows):
import winlean
when useWinUnicode and defined(nimPreviewSlimSystem):
import std/widestrs
proc `==`*(err1, err2: OSErrorCode): bool {.borrow.}
proc `$`*(err: OSErrorCode): string {.borrow.}