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:
committed by
GitHub
parent
2ef0f15b34
commit
206e64d72c
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user