Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement the native operating system version detection for Windows #4581

Closed
andrewrk opened this issue Feb 29, 2020 · 0 comments · Fixed by #4585
Closed

implement the native operating system version detection for Windows #4581

andrewrk opened this issue Feb 29, 2020 · 0 comments · Fixed by #4585
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness. os-windows standard library This issue involves writing Zig code for the standard library.
Milestone

Comments

@andrewrk
Copy link
Member

This is a follow-up task from #4550.

zig/lib/std/zig/system.zig

Lines 223 to 225 in 7617610

.windows => {
// TODO Detect native operating system version.
},

zig/lib/std/target.zig

Lines 75 to 93 in 7617610

/// Based on NTDDI version constants from
/// https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
pub const WindowsVersion = enum(u32) {
nt4 = 0x04000000,
win2k = 0x05000000,
xp = 0x05010000,
ws2003 = 0x05020000,
vista = 0x06000000,
win7 = 0x06010000,
win8 = 0x06020000,
win8_1 = 0x06030000,
win10 = 0x0A000000,
win10_th2 = 0x0A000001,
win10_rs1 = 0x0A000002,
win10_rs2 = 0x0A000003,
win10_rs3 = 0x0A000004,
win10_rs4 = 0x0A000005,
win10_rs5 = 0x0A000006,
win10_19h1 = 0x0A000007,

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. standard library This issue involves writing Zig code for the standard library. os-windows frontend Tokenization, parsing, AstGen, Sema, and Liveness. labels Feb 29, 2020
@andrewrk andrewrk added this to the 0.7.0 milestone Feb 29, 2020
LemonBoy added a commit to LemonBoy/zig that referenced this issue Feb 29, 2020
LemonBoy added a commit to LemonBoy/zig that referenced this issue Feb 29, 2020
@andrewrk andrewrk modified the milestones: 0.7.0, 0.6.0 Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness. os-windows standard library This issue involves writing Zig code for the standard library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant