aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-02-18 09:33:27 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-02-18 09:33:27 -0700
commitefdc94c10712f610e7de5e49fd9cd6f88b4bbbae (patch)
tree4b66ec30176843b0efd87b73199c75aa2fba675d /lib/std/os
parent06df842e4d313e81444063803deff306602e0a17 (diff)
parentc32171991b25b323cd68ff96c294bf5a6fa753b8 (diff)
downloadzig-efdc94c10712f610e7de5e49fd9cd6f88b4bbbae.tar.gz
zig-efdc94c10712f610e7de5e49fd9cd6f88b4bbbae.zip
Merge remote-tracking branch 'origin/master' into llvm16
Diffstat (limited to 'lib/std/os')
-rw-r--r--lib/std/os/linux/syscalls.zig16
-rw-r--r--lib/std/os/windows.zig14
2 files changed, 17 insertions, 13 deletions
diff --git a/lib/std/os/linux/syscalls.zig b/lib/std/os/linux/syscalls.zig
index 36a8bae04c..f176a434b4 100644
--- a/lib/std/os/linux/syscalls.zig
+++ b/lib/std/os/linux/syscalls.zig
@@ -2057,7 +2057,7 @@ pub const Mips64 = enum(usize) {
writev = Linux + 19,
access = Linux + 20,
pipe = Linux + 21,
- select = Linux + 22,
+ _newselect = Linux + 22,
sched_yield = Linux + 23,
mremap = Linux + 24,
msync = Linux + 25,
@@ -2071,8 +2071,8 @@ pub const Mips64 = enum(usize) {
pause = Linux + 33,
nanosleep = Linux + 34,
getitimer = Linux + 35,
- alarm = Linux + 36,
- setitimer = Linux + 37,
+ setitimer = Linux + 36,
+ alarm = Linux + 37,
getpid = Linux + 38,
sendfile = Linux + 39,
socket = Linux + 40,
@@ -2286,7 +2286,7 @@ pub const Mips64 = enum(usize) {
mknodat = Linux + 249,
fchownat = Linux + 250,
futimesat = Linux + 251,
- newfstatat = Linux + 252,
+ fstatat64 = Linux + 252,
unlinkat = Linux + 253,
renameat = Linux + 254,
linkat = Linux + 255,
@@ -2315,8 +2315,8 @@ pub const Mips64 = enum(usize) {
eventfd = Linux + 278,
fallocate = Linux + 279,
timerfd_create = Linux + 280,
- timerfd_settime = Linux + 281,
- timerfd_gettime = Linux + 282,
+ timerfd_gettime = Linux + 281,
+ timerfd_settime = Linux + 282,
signalfd4 = Linux + 283,
eventfd2 = Linux + 284,
epoll_create1 = Linux + 285,
@@ -2382,9 +2382,13 @@ pub const Mips64 = enum(usize) {
process_madvise = Linux + 440,
epoll_pwait2 = Linux + 441,
mount_setattr = Linux + 442,
+ quotactl_fd = Linux + 443,
landlock_create_ruleset = Linux + 444,
landlock_add_rule = Linux + 445,
landlock_restrict_self = Linux + 446,
+ process_mrelease = Linux + 448,
+ futex_waitv = Linux + 449,
+ set_mempolicy_home_node = Linux + 450,
};
pub const PowerPC = enum(usize) {
diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig
index 93e762827b..711bc9f349 100644
--- a/lib/std/os/windows.zig
+++ b/lib/std/os/windows.zig
@@ -85,7 +85,7 @@ pub fn OpenFile(sub_path_w: []const u16, options: OpenFileOptions) OpenError!HAN
var nt_name = UNICODE_STRING{
.Length = path_len_bytes,
.MaximumLength = path_len_bytes,
- .Buffer = @qualCast([*]u16, sub_path_w.ptr),
+ .Buffer = @constCast(sub_path_w.ptr),
};
var attr = OBJECT_ATTRIBUTES{
.Length = @sizeOf(OBJECT_ATTRIBUTES),
@@ -634,7 +634,7 @@ pub fn SetCurrentDirectory(path_name: []const u16) SetCurrentDirectoryError!void
var nt_name = UNICODE_STRING{
.Length = path_len_bytes,
.MaximumLength = path_len_bytes,
- .Buffer = @qualCast([*]u16, path_name.ptr),
+ .Buffer = @constCast(path_name.ptr),
};
const rc = ntdll.RtlSetCurrentDirectory_U(&nt_name);
@@ -766,7 +766,7 @@ pub fn ReadLink(dir: ?HANDLE, sub_path_w: []const u16, out_buffer: []u8) ReadLin
var nt_name = UNICODE_STRING{
.Length = path_len_bytes,
.MaximumLength = path_len_bytes,
- .Buffer = @qualCast([*]u16, sub_path_w.ptr),
+ .Buffer = @constCast(sub_path_w.ptr),
};
var attr = OBJECT_ATTRIBUTES{
.Length = @sizeOf(OBJECT_ATTRIBUTES),
@@ -876,7 +876,7 @@ pub fn DeleteFile(sub_path_w: []const u16, options: DeleteFileOptions) DeleteFil
.Length = path_len_bytes,
.MaximumLength = path_len_bytes,
// The Windows API makes this mutable, but it will not mutate here.
- .Buffer = @qualCast([*]u16, sub_path_w.ptr),
+ .Buffer = @constCast(sub_path_w.ptr),
};
if (sub_path_w[0] == '.' and sub_path_w[1] == 0) {
@@ -1414,7 +1414,7 @@ pub fn sendmsg(
}
pub fn sendto(s: ws2_32.SOCKET, buf: [*]const u8, len: usize, flags: u32, to: ?*const ws2_32.sockaddr, to_len: ws2_32.socklen_t) i32 {
- var buffer = ws2_32.WSABUF{ .len = @truncate(u31, len), .buf = @qualCast([*]u8, buf) };
+ var buffer = ws2_32.WSABUF{ .len = @truncate(u31, len), .buf = @constCast(buf) };
var bytes_send: DWORD = undefined;
if (ws2_32.WSASendTo(s, @ptrCast([*]ws2_32.WSABUF, &buffer), 1, &bytes_send, flags, to, @intCast(i32, to_len), null, null) == ws2_32.SOCKET_ERROR) {
return ws2_32.SOCKET_ERROR;
@@ -1876,13 +1876,13 @@ pub fn eqlIgnoreCaseWTF16(a: []const u16, b: []const u16) bool {
const a_string = UNICODE_STRING{
.Length = a_bytes,
.MaximumLength = a_bytes,
- .Buffer = @qualCast([*]u16, a.ptr),
+ .Buffer = @constCast(a.ptr),
};
const b_bytes = @intCast(u16, b.len * 2);
const b_string = UNICODE_STRING{
.Length = b_bytes,
.MaximumLength = b_bytes,
- .Buffer = @qualCast([*]u16, b.ptr),
+ .Buffer = @constCast(b.ptr),
};
return ntdll.RtlEqualUnicodeString(&a_string, &b_string, TRUE) == TRUE;
}