aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-25 03:43:21 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-02-28 14:51:54 -0500
commit87b9e744dda465ecf7663e2463066ea26a44e63a (patch)
treee3c09dca4b8a06656029b1034da24ed9b7507299 /lib/std/os.zig
parentd4f375c46be2e509ee9161b0577d8a25d6620b3e (diff)
downloadzig-87b9e744dda465ecf7663e2463066ea26a44e63a.tar.gz
zig-87b9e744dda465ecf7663e2463066ea26a44e63a.zip
update std lib to new Target API
Diffstat (limited to 'lib/std/os.zig')
-rw-r--r--lib/std/os.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig
index 6e96413d78..9f349e7dc4 100644
--- a/lib/std/os.zig
+++ b/lib/std/os.zig
@@ -650,7 +650,7 @@ pub fn writev(fd: fd_t, iov: []const iovec_const) WriteError!void {
/// On Windows, if the application has a global event loop enabled, I/O Completion Ports are
/// used to perform the I/O. `error.WouldBlock` is not possible on Windows.
pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) WriteError!void {
- if (comptime std.Target.current.isWindows()) {
+ if (std.Target.current.os.tag == .windows) {
return windows.WriteFile(fd, bytes, offset);
}
@@ -739,7 +739,7 @@ pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) WriteError!void
}
}
- if (comptime std.Target.current.isWindows()) {
+ if (std.Target.current.os.tag == .windows) {
var off = offset;
for (iov) |item| {
try pwrite(fd, item.iov_base[0..item.iov_len], off);