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 library itself.
Zig › std/ › c.zig › POLL
POLL
c.POLL
pub const POLL = switch (native_os )
File
Code
pub const POLL = switch (native_os ) {
.linux => linux .POLL ,
.emscripten => emscripten .POLL ,
.wasi => struct {
pub const RDNORM = 0x1 ;
pub const WRNORM = 0x2 ;
pub const IN = RDNORM ;
pub const OUT = WRNORM ;
pub const ERR = 0x1000 ;
pub const HUP = 0x2000 ;
pub const NVAL = 0x4000 ;
},
.windows => ws2_32 .POLL ,
.driverkit , .ios , .maccatalyst , .macos , .tvos , .visionos , .watchos => struct {
pub const IN = 0x001 ;
pub const PRI = 0x002 ;
pub const OUT = 0x004 ;
pub const RDNORM = 0x040 ;
pub const WRNORM = OUT ;
pub const RDBAND = 0x080 ;
pub const WRBAND = 0x100 ;
pub const EXTEND = 0x0200 ;
pub const ATTRIB = 0x0400 ;
pub const NLINK = 0x0800 ;
pub const WRITE = 0x1000 ;
pub const ERR = 0x008 ;
pub const HUP = 0x010 ;
pub const NVAL = 0x020 ;
pub const STANDARD = IN | PRI | OUT | RDNORM | RDBAND | WRBAND | ERR | HUP | NVAL ;
},
.freebsd => struct {
pub const IN = 0x0001 ;
pub const PRI = 0x0002 ;
pub const OUT = 0x0004 ;
pub const RDNORM = 0x0040 ;
pub const WRNORM = OUT ;
pub const RDBAND = 0x0080 ;
pub const WRBAND = 0x0100 ;
pub const INIGNEOF = 0x2000 ;
pub const ERR = 0x0008 ;
pub const HUP = 0x0010 ;
pub const NVAL = 0x0020 ;
pub const STANDARD = IN | PRI | OUT | RDNORM | RDBAND | WRBAND | ERR | HUP | NVAL ;
},
.illumos => struct {
pub const IN = 0x0001 ;
pub const PRI = 0x0002 ;
pub const OUT = 0x0004 ;
pub const RDNORM = 0x0040 ;
pub const WRNORM = .OUT ;
pub const RDBAND = 0x0080 ;
pub const WRBAND = 0x0100 ;
pub const RDHUP = 0x4000 ;
pub const ERR = 0x0008 ;
pub const HUP = 0x0010 ;
pub const NVAL = 0x0020 ;
pub const REMOVE = 0x0800 ;
pub const ONESHOT = 0x1000 ;
pub const ET = 0x2000 ;
},
.dragonfly , .netbsd => struct {
pub const IN = 0x0001 ;
pub const PRI = 0x0002 ;
pub const OUT = 0x0004 ;
pub const RDNORM = 0x0040 ;
pub const WRNORM = OUT ;
pub const RDBAND = 0x0080 ;
pub const WRBAND = 0x0100 ;
pub const ERR = 0x0008 ;
pub const HUP = 0x0010 ;
pub const NVAL = 0x0020 ;
},
.haiku => struct {
pub const IN = 0x0001 ;
pub const OUT = 0x0002 ;
pub const RDNORM = IN ;
pub const WRNORM = OUT ;
pub const RDBAND = 0x0008 ;
pub const WRBAND = 0x0010 ;
pub const PRI = 0x0020 ;
pub const ERR = 0x0004 ;
pub const HUP = 0x0080 ;
pub const NVAL = 0x1000 ;
},
.openbsd => struct {
pub const IN = 0x0001 ;
pub const PRI = 0x0002 ;
pub const OUT = 0x0004 ;
pub const ERR = 0x0008 ;
pub const HUP = 0x0010 ;
pub const NVAL = 0x0020 ;
pub const RDNORM = 0x0040 ;
pub const NORM = RDNORM ;
pub const WRNORM = OUT ;
pub const RDBAND = 0x0080 ;
pub const WRBAND = 0x0100 ;
},
.serenity => struct {
pub const IN = 0x0001 ;
pub const PRI = 0x0002 ;
pub const OUT = 0x0004 ;
pub const ERR = 0x0008 ;
pub const HUP = 0x0010 ;
pub const NVAL = 0x0020 ;
pub const RDNORM = IN ;
pub const WRNORM = OUT ;
pub const WRBAND = 0x1000 ;
pub const RDHUP = 0x2000 ;
},
else => void ,
}