zig/lib
Ryan Liptak 6aa3570cb0 windows: Make readLinkW APIs output WTF-16, reduce stack usage of callers
- Affects the following functions:
  + `std.fs.Dir.readLinkW`
  + `std.os.windows.ReadLink`
  + `std.os.windows.ntToWin32Namespace`
  + `std.posix.readlinkW`
  + `std.posix.readlinkatW`

Each of these functions (except `ntToWin32Namespace`) took WTF-16 as input and would output WTF-8, which makes optimal buffer re-use difficult at callsites and could force unnecessary WTF-16 <-> WTF-8 conversion during an intermediate step.

The functions have been updated to output WTF-16, and also allow for the path and the output to re-use the same buffer (i.e. in-place modification), which can reduce the stack usage at callsites. For example, all of `std.fs.Dir.readLink`/`readLinkZ`/`std.posix.readlink`/`readlinkZ`/`readlinkat`/`readlinkatZ` have had their stack usage reduced by one PathSpace struct (64 KiB) when targeting Windows.

The new `ntToWin32Namespace` takes an output buffer and returns a slice from that instead of returning a PathSpace, which is necessary to make the above possible.
2025-11-15 18:16:03 -08:00
..
build-web std.Build: implement unit test timeouts 2025-10-18 09:28:39 +01:00
c compiler-rt: move strlen from libzigc to here 2025-08-30 06:36:41 +02:00
compiler std.Target: remove Abi.cygnus 2025-11-12 22:39:04 +01:00
compiler_rt compiler-rt: remove dead code 2025-11-12 16:00:16 +00:00
docs std.fmt: delete deprecated APIs 2025-08-31 12:49:18 -07:00
include remove all IBM AIX and z/OS support 2025-10-29 14:25:51 +01:00
init
libc libc: Add mach-o/getsect.h and mach/exception.h macOS headers 2025-11-04 21:51:48 +00:00
libcxx libcxx: use compiler's _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION when set 2025-11-14 02:02:59 +01:00
libcxxabi remove all IBM AIX and z/OS support 2025-10-29 14:25:51 +01:00
libtsan remove all IBM AIX and z/OS support 2025-10-29 14:25:51 +01:00
libunwind remove all IBM AIX and z/OS support 2025-10-29 14:25:51 +01:00
std windows: Make readLinkW APIs output WTF-16, reduce stack usage of callers 2025-11-15 18:16:03 -08:00
c.zig
compiler_rt.zig compiler-rt: remove dead code 2025-11-12 16:00:16 +00:00
fuzzer.zig fuzzing: fix off-by-one in limit count 2025-09-25 17:16:10 -07:00
ubsan_rt.zig Coff: implement threadlocal variables 2025-10-10 22:47:47 -07:00
zig.h zig.h: drop dependency on deleted compiler_rt functions 2025-11-12 16:00:16 +00:00