aboutsummaryrefslogtreecommitdiff
path: root/src/io/io_darwin.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-06-26 11:56:53 -0700
committerGravatar GitHub <noreply@github.com> 2023-06-26 11:56:53 -0700
commit50e872fc761db50ae2804f780ea9cd655600a7e2 (patch)
treeaeb40380cae3edbea2f4c6e2800ddb914dfa743f /src/io/io_darwin.zig
parent318879d1741035a01fc383821aea7a5ae972b40e (diff)
downloadbun-50e872fc761db50ae2804f780ea9cd655600a7e2.tar.gz
bun-50e872fc761db50ae2804f780ea9cd655600a7e2.tar.zst
bun-50e872fc761db50ae2804f780ea9cd655600a7e2.zip
Implement writev & readv (#3419)
* [node:fs] Implement `writev` and `readv` * writev & readv tests * cast to const type * woops * cast --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Diffstat (limited to 'src/io/io_darwin.zig')
-rw-r--r--src/io/io_darwin.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/io/io_darwin.zig b/src/io/io_darwin.zig
index 8045cbdf6..9ebc6f4d6 100644
--- a/src/io/io_darwin.zig
+++ b/src/io/io_darwin.zig
@@ -274,7 +274,11 @@ pub const darwin = struct {
pub extern "c" fn @"openat$NOCANCEL"(fd: c.fd_t, path: [*:0]const u8, oflag: c_uint, ...) c_int;
pub extern "c" fn @"read$NOCANCEL"(fd: c.fd_t, buf: [*]u8, nbyte: usize) isize;
pub extern "c" fn @"pread$NOCANCEL"(fd: c.fd_t, buf: [*]u8, nbyte: usize, offset: c.off_t) isize;
+ pub extern "c" fn @"preadv$NOCANCEL"(fd: c.fd_t, uf: [*]std.os.iovec, count: i32, offset: c.off_t) isize;
+ pub extern "c" fn @"readv$NOCANCEL"(fd: c.fd_t, uf: [*]std.os.iovec, count: i32) isize;
pub extern "c" fn @"write$NOCANCEL"(fd: c.fd_t, buf: [*]const u8, nbyte: usize) isize;
+ pub extern "c" fn @"writev$NOCANCEL"(fd: c.fd_t, buf: [*]std.os.iovec_const, count: i32) isize;
+ pub extern "c" fn @"pwritev$NOCANCEL"(fd: c.fd_t, buf: [*]std.os.iovec_const, count: i32, offset: c.off_t) isize;
};
pub const OpenError = error{
/// In WASI, this error may occur when the file descriptor does