authorgravatar for doogie1012@gmail.comJae B <doogie1012@gmail.com> 2024-02-24 10:10:50+11:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-02-23 21:18:27-08:00
log774487038fa46a656d308d6686c5b3df757224cb
treefbeb6ab58bc6651f7f636bfd6cc3213c8c1d91f9
parent229b87cab66ec2d90ad91be2d99491f26d5a630a

setup PATH_MAX for emscripten


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

lib/std/fs.zig+1-1
...@@ -39,7 +39,7 @@ pub const GetAppDataDirError = @import("fs/get_app_data_dir.zig").GetAppDataDirE...@@ -39,7 +39,7 @@ pub const GetAppDataDirError = @import("fs/get_app_data_dir.zig").GetAppDataDirE
39/// fit into a UTF-8 encoded array of this length.39/// fit into a UTF-8 encoded array of this length.
40/// The byte count includes room for a null sentinel byte.40/// The byte count includes room for a null sentinel byte.
41pub const MAX_PATH_BYTES = switch (builtin.os.tag) {41pub const MAX_PATH_BYTES = switch (builtin.os.tag) {
42 .linux, .macos, .ios, .freebsd, .openbsd, .netbsd, .dragonfly, .haiku, .solaris, .illumos, .plan9 => os.PATH_MAX,42 .linux, .macos, .ios, .freebsd, .openbsd, .netbsd, .dragonfly, .haiku, .solaris, .illumos, .plan9, .emscripten => os.PATH_MAX,
43 // Each UTF-16LE character may be expanded to 3 UTF-8 bytes.43 // Each UTF-16LE character may be expanded to 3 UTF-8 bytes.
44 // If it would require 4 UTF-8 bytes, then there would be a surrogate44 // If it would require 4 UTF-8 bytes, then there would be a surrogate
45 // pair in the UTF-16LE, and we (over)account 3 bytes for it that way.45 // pair in the UTF-16LE, and we (over)account 3 bytes for it that way.