mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
23 lines
912 B
Zig
23 lines
912 B
Zig
//! 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`.
|
|
//! Root source files can define `os.bits` and these will additionally be added
|
|
//! to the namespace.
|
|
|
|
const std = @import("std");
|
|
const root = @import("root");
|
|
|
|
pub usingnamespace switch (std.Target.current.os.tag) {
|
|
.macos, .ios, .tvos, .watchos => @import("bits/darwin.zig"),
|
|
.dragonfly => @import("bits/dragonfly.zig"),
|
|
.freebsd => @import("bits/freebsd.zig"),
|
|
.haiku => @import("bits/haiku.zig"),
|
|
.linux => @import("bits/linux.zig"),
|
|
.netbsd => @import("bits/netbsd.zig"),
|
|
.openbsd => @import("bits/openbsd.zig"),
|
|
.wasi => @import("bits/wasi.zig"),
|
|
.windows => @import("bits/windows.zig"),
|
|
else => struct {},
|
|
};
|
|
|
|
pub usingnamespace if (@hasDecl(root, "os") and @hasDecl(root.os, "bits")) root.os.bits else struct {};
|