Progress: fix compile errors on windows

Works for `zig build-exe`, IPC still not implemented yet.
This commit is contained in:
Jacob Young
2024-05-26 07:07:44 -04:00
committed by Andrew Kelley
parent d403d8cb7a
commit d77f5e7aaa
5 changed files with 96 additions and 51 deletions

View File

@@ -442,10 +442,7 @@ pub fn parseEnvVarInt(comptime key: []const u8, comptime I: type, base: u8) Pars
if (native_os == .windows) {
const key_w = comptime std.unicode.utf8ToUtf16LeStringLiteral(key);
const text = getenvW(key_w) orelse return error.EnvironmentVariableNotFound;
// For this implementation perhaps std.fmt.parseInt can be expanded to be generic across
// []u8 and []u16 like how many std.mem functions work.
_ = text;
@compileError("TODO implement this");
return std.fmt.parseIntWithGenericCharacter(I, u16, text, base);
} else if (native_os == .wasi and !builtin.link_libc) {
@compileError("parseEnvVarInt is not supported for WASI without libc");
} else {