# breaking: std.os read/write functions \+ sendfile · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c81345c8aec56a108f6f98001666a1552d65ce85)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c81345c8aec56a108f6f98001666a1552d65ce85

Requested commit: c81345c8aec56a108f6f98001666a1552d65ce85

Commit: c81345c8aec56a108f6f98001666a1552d65ce85

Tree: 6a18842256a157896d175d4e254811b9bf478090

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
breaking: std.os read/write functions + sendfile

 * rework os.sendfile and add macosx support, and a fallback
   implementation for any OS.
 * fix sendto compile error
 * std.os write functions support partial writes. closes #3443.
 * std.os pread / pwrite functions can now return `error.Unseekable`.
 * std.fs.File read/write functions now have readAll/writeAll variants
   which loop to complete operations even when partial reads/writes
   happen.
 * Audit std.os read/write functions with respect to Linux returning
   EINVAL for lengths greater than 0x7fff0000.
 * std.os read/write shim functions do not unnecessarily loop. Since
   partial reads/writes are part of the API, the caller will be forced
   to loop anyway, and so that would just be code bloat.
 * Improve doc comments
 * Add a non-trivial test for std.os.sendfile
 * Fix std.os.pread on 32 bit Linux
 * Add missing SYS_sendfile bit on aarch64

```

## Parents

- [bd287dd1942f0a72e6bd9dc8475bd4e7d34fa5f8](https://git.cafe/gitcafe/zig/commit/bd287dd1942f0a72e6bd9dc8475bd4e7d34fa5f8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c81345c8aec56a108f6f98001666a1552d65ce85?format=markdown)
