mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-30 22:40:30 +00:00
Improve system call support
This commit is contained in:
parent
63b867bd2f
commit
3085ac7837
65 changed files with 900 additions and 544 deletions
|
@ -19,6 +19,13 @@
|
|||
#include "libc/nt/struct/teb.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
||||
/**
|
||||
* Returns New Technology version, e.g.
|
||||
*
|
||||
* if (IsWindows() && NtGetVersion() >= kNtVersionWindows10) {...}
|
||||
*
|
||||
* This can only be called on Windows.
|
||||
*/
|
||||
textwindows noasan int NtGetVersion(void) {
|
||||
return (NtGetPeb()->OSMajorVersion & 0xff) << 8 | NtGetPeb()->OSMinorVersion;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue