2019-05-24 16:36:09 -07:00
|
|
|
// Platform-dependent types and values that are used along with OS-specific APIs.
|
|
|
|
// These are imported into `std.c`, `std.os`, and `std.os.linux`.
|
|
|
|
|
|
|
|
const builtin = @import("builtin");
|
|
|
|
|
2019-05-29 15:55:42 -07:00
|
|
|
pub usingnamespace switch (builtin.os) {
|
2019-05-24 16:36:09 -07:00
|
|
|
.macosx, .ios, .tvos, .watchos => @import("bits/darwin.zig"),
|
2019-10-22 15:06:35 -07:00
|
|
|
.dragonfly => @import("bits/dragonfly.zig"),
|
2019-05-24 16:36:09 -07:00
|
|
|
.freebsd => @import("bits/freebsd.zig"),
|
|
|
|
.linux => @import("bits/linux.zig"),
|
|
|
|
.netbsd => @import("bits/netbsd.zig"),
|
|
|
|
.wasi => @import("bits/wasi.zig"),
|
|
|
|
.windows => @import("bits/windows.zig"),
|
|
|
|
else => struct {},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const pthread_t = *@OpaqueType();
|
|
|
|
pub const FILE = @OpaqueType();
|
|
|
|
|
|
|
|
pub const iovec = extern struct {
|
|
|
|
iov_base: [*]u8,
|
|
|
|
iov_len: usize,
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const iovec_const = extern struct {
|
|
|
|
iov_base: [*]const u8,
|
|
|
|
iov_len: usize,
|
|
|
|
};
|