| author | |
| committer | |
| log | 76efc462e7ea90be02fd28254f8c452ba994ea8a |
| tree | b2e4f137b03592c11e7d3a81f351607d54b2ae80 |
| parent | 054c7ab18a8c9527414164bf68aa3564c29e8931 |
2 files changed, 4 insertions(+), 2 deletions(-)
std/c/freebsd.zig+2| ... | @@ -15,6 +15,8 @@ pub extern "c" fn sysctlbyname(name: [*]const u8, oldp: ?*c_void, oldlenp: ?*usi | ... | @@ -15,6 +15,8 @@ pub extern "c" fn sysctlbyname(name: [*]const u8, oldp: ?*c_void, oldlenp: ?*usi |
| 15 | pub extern "c" fn sysctlnametomib(name: [*]const u8, mibp: ?*c_int, sizep: ?*usize) c_int; | 15 | pub extern "c" fn sysctlnametomib(name: [*]const u8, mibp: ?*c_int, sizep: ?*usize) c_int; |
| 16 | pub extern "c" fn getdirentries(fd: c_int, buf_ptr: [*]u8, nbytes: usize, basep: *i64) usize; | 16 | pub extern "c" fn getdirentries(fd: c_int, buf_ptr: [*]u8, nbytes: usize, basep: *i64) usize; |
| 17 | pub extern "c" fn pipe2(arg0: *[2]c_int, arg1: u32) c_int; | 17 | pub extern "c" fn pipe2(arg0: *[2]c_int, arg1: u32) c_int; |
| 18 | pub extern "c" fn preadv(fd: c_int, iov: *const c_void, iovcnt: c_int, offset: usize) isize; | ||
| 19 | pub extern "c" fn pwritev(fd: c_int, iov: *const c_void, iovcnt: c_int, offset: usize) isize; | ||
| 18 | 20 | ||
| 19 | /// Renamed from `kevent` to `Kevent` to avoid conflict with function name. | 21 | /// Renamed from `kevent` to `Kevent` to avoid conflict with function name. |
| 20 | pub const Kevent = extern struct { | 22 | pub const Kevent = extern struct { |
std/os/freebsd/index.zig+2-2| ... | @@ -626,7 +626,7 @@ pub fn pread(fd: i32, buf: [*]u8, nbyte: usize, offset: u64) usize { | ... | @@ -626,7 +626,7 @@ pub fn pread(fd: i32, buf: [*]u8, nbyte: usize, offset: u64) usize { |
| 626 | } | 626 | } |
| 627 | 627 | ||
| 628 | pub fn preadv(fd: i32, iov: [*]const iovec, count: usize, offset: usize) usize { | 628 | pub fn preadv(fd: i32, iov: [*]const iovec, count: usize, offset: usize) usize { |
| 629 | return arch.syscall4(SYS_preadv, @bitCast(usize, isize(fd)), @ptrToInt(iov), count, offset); | 629 | return errnoWrap(c.preadv(fd, @ptrCast(*const c_void, iov), @intCast(c_int, count), offset)); |
| 630 | } | 630 | } |
| 631 | 631 | ||
| 632 | pub fn pipe(fd: *[2]i32) usize { | 632 | pub fn pipe(fd: *[2]i32) usize { |
| ... | @@ -647,7 +647,7 @@ pub fn pwrite(fd: i32, buf: [*]const u8, nbyte: usize, offset: u64) usize { | ... | @@ -647,7 +647,7 @@ pub fn pwrite(fd: i32, buf: [*]const u8, nbyte: usize, offset: u64) usize { |
| 647 | } | 647 | } |
| 648 | 648 | ||
| 649 | pub fn pwritev(fd: i32, iov: [*]const iovec_const, count: usize, offset: usize) usize { | 649 | pub fn pwritev(fd: i32, iov: [*]const iovec_const, count: usize, offset: usize) usize { |
| 650 | return arch.syscall4(SYS_pwritev, @bitCast(usize, isize(fd)), @ptrToInt(iov), count, offset); | 650 | return errnoWrap(c.pwritev(fd, @ptrCast(*const c_void, iov), @intCast(c_int, count), offset)); |
| 651 | } | 651 | } |
| 652 | 652 | ||
| 653 | pub fn rename(old: [*]const u8, new: [*]const u8) usize { | 653 | pub fn rename(old: [*]const u8, new: [*]const u8) usize { |