1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: add os.uname()

This commit is contained in:
Mike 'Fuzzy' Partin
2020-06-14 06:46:30 -07:00
committed by GitHub
parent 2ef0f15b34
commit 206e64d72c
4 changed files with 56 additions and 1 deletions

View File

@@ -317,7 +317,7 @@ pub:
// status_ constants
code u32
flags u32
record &ExceptionRecord
address voidptr
param_count u32
@@ -353,3 +353,15 @@ pub fn add_vectored_exception_handler(first bool, handler VectoredExceptionHandl
pub fn debugger_present() bool {
return C.IsDebuggerPresent()
}
pub fn uname() Uname {
// TODO: implement `os.uname()` for windows
unknown := 'unknown'
return Uname{
sysname: unknown
nodename: unknown
release: unknown
version: unknown
machine: unknown
}
}