authorgravatar for ryan@zinascii.comRyan Zezeski <ryan@zinascii.com> 2023-09-26 16:03:21-06:00
committergravatar for ryan@zinascii.comRyan Zezeski <ryan@zinascii.com> 2023-09-30 11:38:56-06:00
logc17ebdca6afef9523a69caeaea090cd537d71945
tree4b7ab7479cc2fc7f4aa9af13655c4f7d6091727e
parenta0ed2c69b06a55d86b9ca98314f31bd70058e3f8

solaris: fix path component max


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

lib/std/c/solaris.zig+1
...@@ -498,6 +498,7 @@ pub const NI = struct {...@@ -498,6 +498,7 @@ pub const NI = struct {
498 pub const MAXSERV = 32;498 pub const MAXSERV = 32;
499};499};
500500
501pub const NAME_MAX = 255;
501pub const PATH_MAX = 1024;502pub const PATH_MAX = 1024;
502pub const IOV_MAX = 1024;503pub const IOV_MAX = 1024;
503504
lib/std/fs.zig+1-2
...@@ -59,10 +59,9 @@ pub const MAX_PATH_BYTES = switch (builtin.os.tag) {...@@ -59,10 +59,9 @@ pub const MAX_PATH_BYTES = switch (builtin.os.tag) {
59/// (depending on the platform) this assumption may not hold for every configuration.59/// (depending on the platform) this assumption may not hold for every configuration.
60/// The byte count does not include a null sentinel byte.60/// The byte count does not include a null sentinel byte.
61pub const MAX_NAME_BYTES = switch (builtin.os.tag) {61pub const MAX_NAME_BYTES = switch (builtin.os.tag) {
62 .linux, .macos, .ios, .freebsd, .openbsd, .netbsd, .dragonfly => os.NAME_MAX,62 .linux, .macos, .ios, .freebsd, .openbsd, .netbsd, .dragonfly, .solaris => os.NAME_MAX,
63 // Haiku's NAME_MAX includes the null terminator, so subtract one.63 // Haiku's NAME_MAX includes the null terminator, so subtract one.
64 .haiku => os.NAME_MAX - 1,64 .haiku => os.NAME_MAX - 1,
65 .solaris => os.system.MAXNAMLEN,
66 // Each UTF-16LE character may be expanded to 3 UTF-8 bytes.65 // Each UTF-16LE character may be expanded to 3 UTF-8 bytes.
67 // If it would require 4 UTF-8 bytes, then there would be a surrogate66 // If it would require 4 UTF-8 bytes, then there would be a surrogate
68 // pair in the UTF-16LE, and we (over)account 3 bytes for it that way.67 // pair in the UTF-16LE, and we (over)account 3 bytes for it that way.