diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-09-26 01:54:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-26 01:54:45 -0400 |
| commit | 68bb3945708c43109c48bda3664176307d45b62c (patch) | |
| tree | afb9731e10cef9d192560b52cd9ae2cf179775c4 /lib/std/os/bits.zig | |
| parent | 6128bc728d1e1024a178c16c2149f5b1a167a013 (diff) | |
| parent | 4637e8f9699af9c3c6cf4df50ef5bb67c7a318a4 (diff) | |
| download | zig-68bb3945708c43109c48bda3664176307d45b62c.tar.gz zig-68bb3945708c43109c48bda3664176307d45b62c.zip | |
Merge pull request #3315 from ziglang/mv-std-lib
Move std/ to lib/std/
Diffstat (limited to 'lib/std/os/bits.zig')
| -rw-r--r-- | lib/std/os/bits.zig | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/std/os/bits.zig b/lib/std/os/bits.zig new file mode 100644 index 0000000000..f16da2487b --- /dev/null +++ b/lib/std/os/bits.zig @@ -0,0 +1,27 @@ +// 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"); + +pub usingnamespace switch (builtin.os) { + .macosx, .ios, .tvos, .watchos => @import("bits/darwin.zig"), + .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, +}; |
