aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2025-10-17 00:50:16 -0700
committerRyan Liptak <squeek502@hotmail.com>2025-10-17 00:50:16 -0700
commit88fd8ce8604f1c8ea79797f7263ac7b81910da9b (patch)
tree9550825076c18c92feae5dce15a8d1640a4237ca /lib/std/Thread.zig
parent3eb3fbec9c455b4fcea144919ddcd0932cefb23a (diff)
downloadzig-88fd8ce8604f1c8ea79797f7263ac7b81910da9b.tar.gz
zig-88fd8ce8604f1c8ea79797f7263ac7b81910da9b.zip
windows: Always try using POSIX_SEMANTICS/etc for rename/delete
The compile-time check against the minimum version here wasn't appropriate, since it still makes sense to try using FILE_RENAME_INFORMATION_EX even if the minimum version is something like `xp`, since that doesn't rule out the possibility of the compiled code running on Windows 10/11. This compile-time check was doubly bad since the default minimum windows version (`.win10`) was below the `.win10_rs5` that was checked for, so when providing a target like `x86_64-windows-gnu` it'd always rule out using this syscall. After this commit, we always try using FILE_RENAME_INFORMATION_EX and then let the operating system tell us when some aspect of it is not supported. This allows us to get the benefits of these new syscalls/flags whenever it's actually possible. The possible error returns were validated experimentally: - INVALID_PARAMETER is returned when the underlying filesystem is FAT32 - INVALID_INFO_CLASS is returned on Windows 7 when trying to use FileRenameInformationEx/FileDispositionInformationEx - NOT_SUPPORTED is returned on Windows 10 >= .win10_rs5 when setting a bogus flag value (I used `0x1000`)
Diffstat (limited to 'lib/std/Thread.zig')
0 files changed, 0 insertions, 0 deletions