mirror of
https://github.com/status-im/nim-stew.git
synced 2025-02-10 11:06:40 +00:00
unconditionally pass through std/os and deprecate shim/os (#199)
This commit is contained in:
parent
607059fe31
commit
65ce2203f0
@ -1,18 +1,3 @@
|
||||
{.deprecated: "use std/os".}
|
||||
import std/os
|
||||
export os
|
||||
|
||||
when defined(windows):
|
||||
import winlean
|
||||
else:
|
||||
import posix
|
||||
|
||||
when not declared(getCurrentProcessId):
|
||||
proc getCurrentProcessId*(): int =
|
||||
## return current process ID. See also ``osproc.processID(p: Process)``.
|
||||
when defined(windows):
|
||||
proc GetCurrentProcessId(): DWORD {.stdcall, dynlib: "kernel32",
|
||||
importc: "GetCurrentProcessId".}
|
||||
GetCurrentProcessId().int
|
||||
else:
|
||||
getpid()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user