aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-22 17:35:36 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-02-22 17:35:36 -0500
commitcfffb9c5e96eeeae43cd724e2d02ec8c2b7714e0 (patch)
tree342ef6e97cd6f0a3a65839ab0b5e5326a9ea296d /test/compile_errors.zig
parent936d0b18b116ea126893d2f165f9be72f8bef845 (diff)
downloadzig-cfffb9c5e96eeeae43cd724e2d02ec8c2b7714e0.tar.gz
zig-cfffb9c5e96eeeae43cd724e2d02ec8c2b7714e0.zip
improve handling of environment variables on Windows
std.os.getenv and std.os.getenvZ have nice compile errors when not linking libc and using Windows. std.os.getenvW is provided as a Windows-only API that does not require an allocator. It uses the Process Environment Block. std.process.getEnvVarOwned is improved to be a simple wrapper on top of std.os.getenvW. std.process.getEnvMap is improved to use the Process Environment Block rather than calling GetEnvironmentVariableW. std.zig.system.NativePaths uses process.getEnvVarOwned instead of std.os.getenvZ, which works on Windows as well as POSIX.
Diffstat (limited to 'test/compile_errors.zig')
0 files changed, 0 insertions, 0 deletions