diff options
| author | Ryan Zezeski <ryan@zinascii.com> | 2023-09-26 16:03:21 -0600 |
|---|---|---|
| committer | Ryan Zezeski <ryan@zinascii.com> | 2023-09-30 11:38:56 -0600 |
| commit | c17ebdca6afef9523a69caeaea090cd537d71945 (patch) | |
| tree | 4b7ab7479cc2fc7f4aa9af13655c4f7d6091727e /lib/std/fs.zig | |
| parent | a0ed2c69b06a55d86b9ca98314f31bd70058e3f8 (diff) | |
| download | zig-c17ebdca6afef9523a69caeaea090cd537d71945.tar.gz zig-c17ebdca6afef9523a69caeaea090cd537d71945.zip | |
solaris: fix path component max
Diffstat (limited to 'lib/std/fs.zig')
| -rw-r--r-- | lib/std/fs.zig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/std/fs.zig b/lib/std/fs.zig index 2429243dda..ab887251fb 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -59,10 +59,9 @@ pub const MAX_PATH_BYTES = switch (builtin.os.tag) { /// (depending on the platform) this assumption may not hold for every configuration. /// The byte count does not include a null sentinel byte. pub const MAX_NAME_BYTES = switch (builtin.os.tag) { - .linux, .macos, .ios, .freebsd, .openbsd, .netbsd, .dragonfly => os.NAME_MAX, + .linux, .macos, .ios, .freebsd, .openbsd, .netbsd, .dragonfly, .solaris => os.NAME_MAX, // Haiku's NAME_MAX includes the null terminator, so subtract one. .haiku => os.NAME_MAX - 1, - .solaris => os.system.MAXNAMLEN, // Each UTF-16LE character may be expanded to 3 UTF-8 bytes. // 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. |
