authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2022-10-14 00:23:00-07:00
committergravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2022-10-29 14:30:45-07:00
logc5d23161fcadf06089656b1f1d0fb725d7217b74
treee5666926a3c54b67ef8d4a95ba7d05a61d00a027
parentdd0962d5ea62742de50c62065856580d340e6cab

Set wasi MAX_NAME_BYTES to minimum of the rest of the supported platforms

This is a slightly weird situation, because the 'real' value may depend on the host platform that the WASI is being executed on.

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/fs.zig+1-1
......@@ -60,7 +60,7 @@ pub const MAX_NAME_BYTES = switch (builtin.os.tag) {
6060 // pair in the UTF-16LE, and we (over)account 3 bytes for it that way.
6161 .windows => os.windows.NAME_MAX * 3,
6262 // TODO work out what a reasonable value we should use here
63 .wasi => 1024,
63 .wasi => 255,
6464 else => if (@hasDecl(root, "os") and @hasDecl(root.os, "NAME_MAX"))
6565 root.os.NAME_MAX
6666 else