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 › MSG Public Constant MSG Doc Source Public Constant std.c.MSG
pub const MSG = switch (native_os ) File c.zig: 5776
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892 pub const MSG = switch (native_os ) {
.linux => linux .MSG ,
.emscripten => emscripten .MSG ,
.windows => ws2_32 .MSG ,
.driverkit , .ios , .maccatalyst , .macos , .tvos , .visionos , .watchos => darwin .MSG ,
.haiku => struct {
pub const OOB = 0x0001 ;
pub const PEEK = 0x0002 ;
pub const DONTROUTE = 0x0004 ;
pub const EOR = 0x0008 ;
pub const TRUNC = 0x0010 ;
pub const CTRUNC = 0x0020 ;
pub const WAITALL = 0x0040 ;
pub const DONTWAIT = 0x0080 ;
pub const BCAST = 0x0100 ;
pub const MCAST = 0x0200 ;
pub const EOF = 0x0400 ;
pub const NOSIGNAL = 0x0800 ;
},
// https://github.com/SerenityOS/serenity/blob/ac44ec5ebc707f9dd0c3d4759a1e17e91db5d74f/Kernel/API/POSIX/sys/socket.h#L56-L64
.serenity => struct {
pub const TRUNC = 0x1 ;
pub const CTRUNC = 0x2 ;
pub const PEEK = 0x4 ;
pub const OOB = 0x8 ;
pub const DONTROUTE = 0x10 ;
pub const WAITALL = 0x20 ;
pub const DONTWAIT = 0x40 ;
pub const NOSIGNAL = 0x80 ;
pub const EOR = 0x100 ;
},
.freebsd => struct {
pub const OOB = 0x00000001 ;
pub const PEEK = 0x00000002 ;
pub const DONTROUTE = 0x00000004 ;
pub const EOR = 0x00000008 ;
pub const TRUNC = 0x00000010 ;
pub const CTRUNC = 0x00000020 ;
pub const WAITALL = 0x00000040 ;
pub const DONTWAIT = 0x00000080 ;
pub const EOF = 0x00000100 ;
pub const NOTIFICATION = 0x00002000 ;
pub const NBIO = 0x00004000 ;
pub const COMPAT = 0x00008000 ;
pub const SOCALLBCK = 0x00010000 ;
pub const NOSIGNAL = 0x00020000 ;
pub const CMSG_CLOEXEC = 0x00040000 ;
pub const WAITFORONE = 0x00080000 ;
pub const MORETOCOME = 0x00100000 ;
pub const TLSAPPDATA = 0x00200000 ;
},
.netbsd => struct {
pub const OOB = 0x0001 ;
pub const PEEK = 0x0002 ;
pub const DONTROUTE = 0x0004 ;
pub const EOR = 0x0008 ;
pub const TRUNC = 0x0010 ;
pub const CTRUNC = 0x0020 ;
pub const WAITALL = 0x0040 ;
pub const DONTWAIT = 0x0080 ;
pub const BCAST = 0x0100 ;
pub const MCAST = 0x0200 ;
pub const NOSIGNAL = 0x0400 ;
pub const CMSG_CLOEXEC = 0x0800 ;
pub const NBIO = 0x1000 ;
pub const WAITFORONE = 0x2000 ;
pub const NOTIFICATION = 0x4000 ;
},
// https://github.com/openbsd/src/blob/42a7be81bef70c04732f45ec573622effe56b563/sys/sys/socket.h#L506
.openbsd => struct {
pub const OOB = 0x1 ;
pub const PEEK = 0x2 ;
pub const DONTROUTE = 0x4 ;
pub const EOR = 0x8 ;
pub const TRUNC = 0x10 ;
pub const CTRUNC = 0x20 ;
pub const WAITALL = 0x40 ;
pub const DONTWAIT = 0x80 ;
pub const BCAST = 0x100 ;
pub const MCAST = 0x200 ;
pub const NOSIGNAL = 0x400 ;
pub const CMSG_CLOEXEC = 0x800 ;
pub const WAITFORONE = 0x1000 ;
pub const CMSG_CLOFORK = 0x2000 ;
},
.dragonfly => struct {
pub const OOB = 0x0001 ;
pub const PEEK = 0x0002 ;
pub const DONTROUTE = 0x0004 ;
pub const EOR = 0x0008 ;
pub const TRUNC = 0x0010 ;
pub const CTRUNC = 0x0020 ;
pub const WAITALL = 0x0040 ;
pub const DONTWAIT = 0x0080 ;
pub const NOSIGNAL = 0x0400 ;
pub const SYNC = 0x0800 ;
pub const CMSG_CLOEXEC = 0x1000 ;
pub const CMSG_CLOFORK = 0x2000 ;
pub const FBLOCKING = 0x10000 ;
pub const FNONBLOCKING = 0x20000 ;
},
.illumos => struct {
pub const OOB = 0x0001 ;
pub const PEEK = 0x0002 ;
pub const DONTROUTE = 0x0004 ;
pub const EOR = 0x0008 ;
pub const CTRUNC = 0x0010 ;
pub const TRUNC = 0x0020 ;
pub const WAITALL = 0x0040 ;
pub const DONTWAIT = 0x0080 ;
pub const NOTIFICATION = 0x0100 ;
pub const NOSIGNAL = 0x0200 ;
pub const CMSG_CLOEXEC = 0x1000 ;
pub const CMSG_CLOFORK = 0x2000 ;
},
else => void ,
}