authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2025-01-28 21:44:10-05:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-01-30 04:35:27+01:00
logcd365b8b824efefb1948c4208722693646510cad
treea7dc0132aa7c715a608bff3ac4929141d00e57d7
parent7cef585f554fdb263a80479f0556fbfba28a7fb8

std: fix comptime SemanticVersion expr regression

- effects FreeBSD memfd and Windows DeleteFile - regression: e5d5a8bc4ea6b27dc3540ad4800a1231ff50b33d

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

lib/std/os/windows.zig+1-1
...@@ -1061,7 +1061,7 @@ pub fn DeleteFile(sub_path_w: []const u16, options: DeleteFileOptions) DeleteFil...@@ -1061,7 +1061,7 @@ pub fn DeleteFile(sub_path_w: []const u16, options: DeleteFileOptions) DeleteFil
1061 // us INVALID_PARAMETER.1061 // us INVALID_PARAMETER.
1062 // The same reasoning for win10_rs5 as in os.renameatW() applies (FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE requires >= win10_rs5).1062 // The same reasoning for win10_rs5 as in os.renameatW() applies (FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE requires >= win10_rs5).
1063 var need_fallback = true;1063 var need_fallback = true;
1064 if (builtin.target.os.version_range.windows.min.isAtLeast(.win10_rs5)) {1064 if (comptime builtin.target.os.version_range.windows.min.isAtLeast(.win10_rs5)) {
1065 // Deletion with posix semantics if the filesystem supports it.1065 // Deletion with posix semantics if the filesystem supports it.
1066 var info = FILE_DISPOSITION_INFORMATION_EX{1066 var info = FILE_DISPOSITION_INFORMATION_EX{
1067 .Flags = FILE_DISPOSITION_DELETE |1067 .Flags = FILE_DISPOSITION_DELETE |
lib/std/posix.zig+1-1
...@@ -6831,7 +6831,7 @@ pub fn memfd_createZ(name: [*:0]const u8, flags: u32) MemFdCreateError!fd_t {...@@ -6831,7 +6831,7 @@ pub fn memfd_createZ(name: [*:0]const u8, flags: u32) MemFdCreateError!fd_t {
6831 }6831 }
6832 },6832 },
6833 .freebsd => {6833 .freebsd => {
6834 if (builtin.os.version_range.semver.max.order(.{ .major = 13, .minor = 0, .patch = 0 }) == .lt)6834 if (comptime builtin.os.version_range.semver.max.order(.{ .major = 13, .minor = 0, .patch = 0 }) == .lt)
6835 @compileError("memfd_create is unavailable on FreeBSD < 13.0");6835 @compileError("memfd_create is unavailable on FreeBSD < 13.0");
6836 const rc = system.memfd_create(name, flags);6836 const rc = system.memfd_create(name, flags);
6837 switch (errno(rc)) {6837 switch (errno(rc)) {