mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 13:58:27 +00:00
Add wasi branch to MAX_NAME_BYTES
This commit is contained in:
parent
c6ff1a7160
commit
dd0962d5ea
@ -59,6 +59,8 @@ pub const MAX_NAME_BYTES = switch (builtin.os.tag) {
|
||||
// If it would require 4 UTF-8 bytes, then there would be a surrogate
|
||||
// pair in the UTF-16LE, and we (over)account 3 bytes for it that way.
|
||||
.windows => os.windows.NAME_MAX * 3,
|
||||
// TODO work out what a reasonable value we should use here
|
||||
.wasi => 1024,
|
||||
else => if (@hasDecl(root, "os") and @hasDecl(root.os, "NAME_MAX"))
|
||||
root.os.NAME_MAX
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user