Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Constant

system

Public Constant
std.posix.system
pub const system = if (use_libc)
    std.c
else switch (native_os)

A libc-compatible API layer.

File

posix.zig:36
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
pub const system = if (use_libc)
    std.c
else switch (native_os) {
    .linux => linux,
    .plan9 => std.os.plan9,
    .psp => struct {
        pub const fd_t = i32;
        pub const pid_t = void;
        pub const pollfd = void;
        pub const uid_t = void;
        pub const gid_t = void;
        pub const mode_t = u32;
        pub const nlink_t = u32;
        pub const blksize_t = u32;
        pub const ino_t = u64;
        pub const IFNAMESIZE = {};
        pub const SIG = void;

        // https://github.com/pspdev/newlib/blob/9e0a073634ad73e8e088f2e071c55a9fe5d39709/newlib/libc/sys/psp/sys/dirent.h#L19
        pub const NAME_MAX = 255;
    },
    else => struct {
        pub const pid_t = void;
        pub const pollfd = void;
        pub const fd_t = void;
        pub const uid_t = void;
        pub const gid_t = void;
        pub const mode_t = u0;
        pub const nlink_t = u0;
        pub const blksize_t = void;
        pub const ino_t = void;
        pub const IFNAMESIZE = {};
        pub const SIG = void;
    },
}