Skip to content

Commit c8b1253

Browse files
authored
Merge pull request rust-lang#354 from fiveop/poll_constants
Add missing constants for poll() flags
2 parents 3630c46 + 965df8e commit c8b1253

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,6 +1285,11 @@ pub const CTL_DEBUG_NAME: ::c_int = 0;
12851285
pub const CTL_DEBUG_VALUE: ::c_int = 1;
12861286
pub const CTL_DEBUG_MAXID: ::c_int = 20;
12871287

1288+
pub const POLLRDNORM: ::c_short = 0x040;
1289+
pub const POLLWRNORM: ::c_short = 0x004;
1290+
pub const POLLRDBAND: ::c_short = 0x080;
1291+
pub const POLLWRBAND: ::c_short = 0x100;
1292+
12881293
pub const PRIO_DARWIN_THREAD: ::c_int = 3;
12891294
pub const PRIO_DARWIN_PROCESS: ::c_int = 4;
12901295
pub const PRIO_DARWIN_BG: ::c_int = 0x1000;

src/unix/notbsd/linux/mips.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,11 @@ pub const SIG_SETMASK: ::c_int = 3;
413413
pub const SIG_BLOCK: ::c_int = 0x1;
414414
pub const SIG_UNBLOCK: ::c_int = 0x2;
415415

416+
pub const POLLRDNORM: ::c_short = 0x040;
417+
pub const POLLWRNORM: ::c_short = 0x004;
418+
pub const POLLRDBAND: ::c_short = 0x080;
419+
pub const POLLWRBAND: ::c_short = 0x100;
420+
416421
pub const PTHREAD_STACK_MIN: ::size_t = 131072;
417422

418423
pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;

src/unix/notbsd/linux/musl/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ pub const MADV_DONTDUMP: ::c_int = 16;
153153

154154
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
155155

156+
pub const POLLRDNORM: ::c_short = 0x040;
157+
pub const POLLWRNORM: ::c_short = 0x100;
158+
pub const POLLRDBAND: ::c_short = 0x080;
159+
pub const POLLWRBAND: ::c_short = 0x200;
160+
156161
pub const MADV_HUGEPAGE: ::c_int = 14;
157162
pub const MADV_NOHUGEPAGE: ::c_int = 15;
158163

src/unix/notbsd/linux/other/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,11 @@ pub const SIG_SETMASK: ::c_int = 2;
378378
pub const SIG_BLOCK: ::c_int = 0x000000;
379379
pub const SIG_UNBLOCK: ::c_int = 0x01;
380380

381+
pub const POLLRDNORM: ::c_short = 0x040;
382+
pub const POLLWRNORM: ::c_short = 0x100;
383+
pub const POLLRDBAND: ::c_short = 0x080;
384+
pub const POLLWRBAND: ::c_short = 0x200;
385+
381386
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
382387
pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
383388

0 commit comments

Comments
 (0)