pub const Block = switch (native_os) 25
26
27
28
29
30
31
32
33pub const Block = switch (native_os) {
.windows => GlobalBlock,
.wasi, .emscripten => switch (builtin.link_libc) {
false => GlobalBlock,
true => PosixBlock,
},
.freestanding, .other => GlobalBlock,
else => PosixBlock,
}
On WASI without libc, this is
voidbecause the environment has to be queried and heap-allocated at runtime.On Windows, the memory pointed at by the PEB changes when the environment is modified, so a long-lived pointer cannot be used. Therefore, on this operating system
voidis also used.