| ... | @@ -10588,7 +10588,7 @@ pub const socket = switch (native_os) { | ... | @@ -10588,7 +10588,7 @@ pub const socket = switch (native_os) { |
| 10588 | | 10588 | |
| 10589 | pub const socketpair = switch (native_os) { | 10589 | pub const socketpair = switch (native_os) { |
| 10590 | // https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/#unsupported\unavailable: | 10590 | // https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/#unsupported\unavailable: |
| 10591 | .windows => void, | 10591 | .windows => {}, |
| 10592 | else => private.socketpair, | 10592 | else => private.socketpair, |
| 10593 | }; | 10593 | }; |
| 10594 | | 10594 | |
| ... | @@ -10775,11 +10775,10 @@ pub extern "c" fn recvfrom( | ... | @@ -10775,11 +10775,10 @@ pub extern "c" fn recvfrom( |
| 10775 | ) if (native_os == .windows) c_int else isize; | 10775 | ) if (native_os == .windows) c_int else isize; |
| 10776 | | 10776 | |
| 10777 | pub const recvmsg = switch (native_os) { | 10777 | pub const recvmsg = switch (native_os) { |
| 10778 | // Windows: Technically, a form of recvmsg() exists for Windows, but the | 10778 | // Technically, a form of recvmsg() exists for Windows, but the user has to |
| 10779 | // user has to install some kind of callback for it. I'm not sure if/how | 10779 | // install some kind of callback for it. |
| 10780 | // we can map this to normal recvmsg() interface use. | | |
| 10781 | // https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_wsarecvmsg | 10780 | // https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_wsarecvmsg |
| 10782 | .windows => void, | 10781 | .windows => {}, |
| 10783 | else => private.recvmsg, | 10782 | else => private.recvmsg, |
| 10784 | }; | 10783 | }; |
| 10785 | | 10784 | |
| ... | @@ -11087,6 +11086,20 @@ pub extern "c" fn pthread_getthreadid_np() c_int; | ... | @@ -11087,6 +11086,20 @@ pub extern "c" fn pthread_getthreadid_np() c_int; |
| 11087 | pub extern "c" fn pthread_set_name_np(thread: pthread_t, name: [*:0]const u8) void; | 11086 | pub extern "c" fn pthread_set_name_np(thread: pthread_t, name: [*:0]const u8) void; |
| 11088 | pub extern "c" fn pthread_get_name_np(thread: pthread_t, name: [*:0]u8, len: usize) void; | 11087 | pub extern "c" fn pthread_get_name_np(thread: pthread_t, name: [*:0]u8, len: usize) void; |
| 11089 | | 11088 | |
| | 11089 | pub const TIMER = switch (native_os) { |
| | 11090 | .linux, .emscripten => std.os.linux.TIMER, |
| | 11091 | .openbsd, .netbsd, .wasi, .windows, .freebsd => packed struct(u32) { |
| | 11092 | ABSTIME: bool, |
| | 11093 | _: u31 = 0, |
| | 11094 | }, |
| | 11095 | else => void, |
| | 11096 | }; |
| | 11097 | |
| | 11098 | pub const clock_nanosleep = switch (native_os) { |
| | 11099 | .linux, .emscripten, .netbsd, .wasi, .windows, .freebsd => private.clock_nanosleep, |
| | 11100 | else => {}, |
| | 11101 | }; |
| | 11102 | |
| 11090 | // OS-specific bits. These are protected from being used on the wrong OS by | 11103 | // OS-specific bits. These are protected from being used on the wrong OS by |
| 11091 | // comptime assertions inside each OS-specific file. | 11104 | // comptime assertions inside each OS-specific file. |
| 11092 | | 11105 | |
| ... | @@ -11476,6 +11489,7 @@ const private = struct { | ... | @@ -11476,6 +11489,7 @@ const private = struct { |
| 11476 | extern "c" fn gettimeofday(noalias tv: ?*timeval, noalias tz: ?*timezone) c_int; | 11489 | extern "c" fn gettimeofday(noalias tv: ?*timeval, noalias tz: ?*timezone) c_int; |
| 11477 | extern "c" fn msync(addr: *align(page_size) const anyopaque, len: usize, flags: c_int) c_int; | 11490 | extern "c" fn msync(addr: *align(page_size) const anyopaque, len: usize, flags: c_int) c_int; |
| 11478 | extern "c" fn nanosleep(rqtp: *const timespec, rmtp: ?*timespec) c_int; | 11491 | extern "c" fn nanosleep(rqtp: *const timespec, rmtp: ?*timespec) c_int; |
| | 11492 | extern "c" fn clock_nanosleep(clockid: clockid_t, flags: TIMER, t: *const timespec, remain: ?*timespec) c_int; |
| 11479 | extern "c" fn pipe2(fds: *[2]fd_t, flags: O) c_int; | 11493 | extern "c" fn pipe2(fds: *[2]fd_t, flags: O) c_int; |
| 11480 | extern "c" fn readdir(dir: *DIR) ?*dirent; | 11494 | extern "c" fn readdir(dir: *DIR) ?*dirent; |
| 11481 | extern "c" fn realpath(noalias file_name: [*:0]const u8, noalias resolved_name: [*]u8) ?[*:0]u8; | 11495 | extern "c" fn realpath(noalias file_name: [*:0]const u8, noalias resolved_name: [*]u8) ?[*:0]u8; |