| author | |
| committer | |
| log | 2037dba90f5815f6fc3137c2485e908700c009e5 |
| tree | 557415a72fb5c2fddae6f7a876fccae21d7aed88 |
| parent | fdf19984b8af9781cd68dda3fcbcc44ac8ade80e |
2 files changed, 17 insertions(+), 1 deletions(-)
lib/std/Io/Dir.zig+1-1| ... | ... | @@ -52,7 +52,7 @@ pub const max_path_bytes = switch (native_os) { |
| 52 | 52 | /// On WASI, file name components are encoded as valid UTF-8. |
| 53 | 53 | /// On other platforms, `[]u8` components are an opaque sequence of bytes with no particular encoding. |
| 54 | 54 | pub const max_name_bytes = switch (native_os) { |
| 55 | .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .openbsd, .netbsd, .dragonfly, .illumos, .serenity => std.posix.NAME_MAX, | |
| 55 | .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .openbsd, .netbsd, .dragonfly, .illumos, .serenity, .psp => std.posix.NAME_MAX, | |
| 56 | 56 | // Haiku's NAME_MAX includes the null terminator, so subtract one. |
| 57 | 57 | .haiku => std.posix.NAME_MAX - 1, |
| 58 | 58 | // Each WTF-16LE character may be expanded to 3 WTF-8 bytes. |
lib/std/posix.zig+16| ... | ... | @@ -38,6 +38,22 @@ pub const system = if (use_libc) |
| 38 | 38 | else switch (native_os) { |
| 39 | 39 | .linux => linux, |
| 40 | 40 | .plan9 => std.os.plan9, |
| 41 | .psp => struct { | |
| 42 | pub const fd_t = i32; | |
| 43 | pub const pid_t = void; | |
| 44 | pub const pollfd = void; | |
| 45 | pub const uid_t = void; | |
| 46 | pub const gid_t = void; | |
| 47 | pub const mode_t = u32; | |
| 48 | pub const nlink_t = u32; | |
| 49 | pub const blksize_t = u32; | |
| 50 | pub const ino_t = u64; | |
| 51 | pub const IFNAMESIZE = {}; | |
| 52 | pub const SIG = void; | |
| 53 | ||
| 54 | // https://github.com/pspdev/newlib/blob/9e0a073634ad73e8e088f2e071c55a9fe5d39709/newlib/libc/sys/psp/sys/dirent.h#L19 | |
| 55 | pub const NAME_MAX = 255; | |
| 56 | }, | |
| 41 | 57 | else => struct { |
| 42 | 58 | pub const pid_t = void; |
| 43 | 59 | pub const pollfd = void; |