| ... | ... | @@ -110,21 +110,6 @@ pub const socklen_t = u32; |
| 110 | 110 | // Modes and flags for dlopen() |
| 111 | 111 | // include/dlfcn.h |
| 112 | 112 | |
| 113 | | pub const POLL = struct { |
| 114 | | /// input available |
| 115 | | pub const IN = 70; |
| 116 | | /// output available |
| 117 | | pub const OUT = 71; |
| 118 | | /// input message available |
| 119 | | pub const MSG = 72; |
| 120 | | /// I/O error |
| 121 | | pub const ERR = 73; |
| 122 | | /// high priority input available |
| 123 | | pub const PRI = 74; |
| 124 | | /// device disconnected |
| 125 | | pub const HUP = 75; |
| 126 | | }; |
| 127 | | |
| 128 | 113 | pub const RTLD = struct { |
| 129 | 114 | /// relocations are performed as needed |
| 130 | 115 | pub const LAZY = 0; |
| ... | ... | @@ -177,14 +162,6 @@ pub const msghdr = extern struct { |
| 177 | 162 | pub const off_t = i64; |
| 178 | 163 | pub const ino_t = u64; |
| 179 | 164 | |
| 180 | | pub const nfds_t = u32; |
| 181 | | |
| 182 | | pub const pollfd = extern struct { |
| 183 | | fd: i32, |
| 184 | | events: i16, |
| 185 | | revents: i16, |
| 186 | | }; |
| 187 | | |
| 188 | 165 | pub const Stat = extern struct { |
| 189 | 166 | dev: i32, |
| 190 | 167 | ino: u64, |
| ... | ... | @@ -427,7 +404,39 @@ pub const W = struct { |
| 427 | 404 | } |
| 428 | 405 | }; |
| 429 | 406 | |
| 430 | | // posix/signal.h |
| 407 | // /system/develop/headers/posix/poll.h |
| 408 | |
| 409 | pub const nfds_t = usize; |
| 410 | |
| 411 | pub const pollfd = extern struct { |
| 412 | fd: i32, |
| 413 | events: i16, |
| 414 | revents: i16, |
| 415 | }; |
| 416 | |
| 417 | pub const POLL = struct { |
| 418 | /// any readable data available |
| 419 | pub const IN = 0x0001; |
| 420 | /// file descriptor is writeable |
| 421 | pub const OUT = 0x0002; |
| 422 | pub const RDNORM = IN; |
| 423 | pub const WRNORM = OUT; |
| 424 | /// priority readable data |
| 425 | pub const RDBAND = 0x0008; |
| 426 | /// priority data can be written |
| 427 | pub const WRBAND = 0x0010; |
| 428 | /// high priority readable data |
| 429 | pub const PRI = 0x0020; |
| 430 | |
| 431 | /// errors pending |
| 432 | pub const ERR = 0x0004; |
| 433 | /// disconnected |
| 434 | pub const HUP = 0x0080; |
| 435 | /// invalid file descriptor |
| 436 | pub const NVAL = 0x1000; |
| 437 | }; |
| 438 | |
| 439 | // /system/develop/headers/posix/signal.h |
| 431 | 440 | |
| 432 | 441 | pub const sigset_t = u64; |
| 433 | 442 | pub const empty_sigset: sigset_t = 0; |
| ... | ... | @@ -548,7 +557,7 @@ pub const ucontext_t = extern struct { |
| 548 | 557 | mcontext: mcontext_t, |
| 549 | 558 | }; |
| 550 | 559 | |
| 551 | | // arch/*/signal.h |
| 560 | // /system/develop/headers/posix/arch/*/signal.h |
| 552 | 561 | |
| 553 | 562 | pub const vregs = switch (builtin.cpu.arch) { |
| 554 | 563 | .arm, .thumb => extern struct { |