Zig 0.17.0-dev (Split by item) 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.
std › c › SCM Public Constant SCM Doc Source Public Constant std.c.SCM
pub const SCM = switch (native_os ) File c.zig: 6922
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975 pub const SCM = switch (native_os ) {
.linux , .emscripten => linux .SCM ,
// https://github.com/illumos/illumos-gate/blob/489f6310fe8952e87fc1dce8af87990fcfd90f18/usr/src/uts/common/sys/socket.h#L196
.illumos => struct {
pub const RIGHTS = 0x1010 ;
pub const UCRED = 0x1012 ;
pub const TIMESTAMP = SO .TIMESTAMP ;
},
// https://github.com/haiku/haiku/blob/e3d01e53a25446d5ba4999d0ff6dff29a2418657/headers/posix/sys/socket.h#L156
.haiku => struct {
pub const RIGHTS = 1 ;
},
// https://github.com/SerenityOS/serenity/blob/c6618f36bf0949bd76177f202659b1f3079e0792/Kernel/API/POSIX/sys/socket.h#L171
.serenity => struct {
pub const TIMESTAMP = 0 ;
pub const RIGHTS = 1 ;
},
// https://github.com/freebsd/freebsd-src/blob/614e9b33bf5594d9d09b5d296afa4f3aa6971823/sys/sys/socket.h#L593
.freebsd => struct {
pub const RIGHTS = 1 ;
pub const TIMESTAMP = 2 ;
pub const CREDS = 3 ;
pub const BINTIME = 4 ;
pub const REALTIME = 5 ;
pub const MONOTONIC = 6 ;
pub const TIME_INFO = 7 ;
pub const CREDS2 = 8 ;
},
// https://github.com/DragonFlyBSD/DragonFlyBSD/blob/6098912863ed4c7b3f70d7483910ce2956cf4ed3/sys/sys/socket.h#L520
.dragonfly => struct {
pub const RIGHTS = 1 ;
pub const TIMESTAMP = 2 ;
pub const CREDS = 3 ;
},
// https://github.com/NetBSD/src/blob/3311177ea898ab8322292ba0e48faa9b2e834cb6/sys/sys/socket.h#L578
.netbsd => struct {
pub const RIGHTS = 0x01 ;
pub const TIMESTAMP = 0x08 ;
pub const CREDS = 0x10 ;
},
// https://github.com/openbsd/src/blob/1b1dd04c9634112eb763374379af99a68ace4328/sys/sys/socket.h#L566
.openbsd => struct {
pub const RIGHTS = 0x01 ;
pub const TIMESTAMP = 0x04 ;
},
// https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L1114
.driverkit , .ios , .maccatalyst , .macos , .tvos , .visionos , .watchos => struct {
pub const RIGHTS = 1 ;
pub const TIMESTAMP = 2 ;
pub const CREDS = 3 ;
pub const TIMESTAMP_MONOTONIC = 4 ;
},
else => void ,
}