Skip to content

Commit 21101f9

Browse files
committed
Auto merge of rust-lang#654 - Susurrus:moarmoar, r=alexcrichton
Various constants for mips64 and s390x Now that these platforms were added to `libc`, we'd like to support them for `nix`. Here's some missing constants for us. We'll see if this passes CI...
2 parents 288942e + f260fa0 commit 21101f9

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,10 @@ pub const TIOCM_RNG: ::c_int = 0x200;
620620
pub const TIOCM_RI: ::c_int = TIOCM_RNG;
621621
pub const TIOCM_DSR: ::c_int = 0x400;
622622

623+
pub const EHWPOISON: ::c_int = 168;
624+
pub const SIGEV_THREAD_ID: ::c_int = 4;
625+
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
626+
623627
#[link(name = "util")]
624628
extern {
625629
pub fn sysctl(name: *mut ::c_int,

src/unix/notbsd/linux/s390x.rs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,12 +497,16 @@ pub const SO_SNDBUF: ::c_int = 7;
497497
pub const SO_RCVBUF: ::c_int = 8;
498498
pub const SO_KEEPALIVE: ::c_int = 9;
499499
pub const SO_OOBINLINE: ::c_int = 10;
500+
pub const SO_PRIORITY: ::c_int = 12;
500501
pub const SO_LINGER: ::c_int = 13;
502+
pub const SO_BSDCOMPAT: ::c_int = 14;
501503
pub const SO_REUSEPORT: ::c_int = 15;
504+
pub const SO_PASSCRED: ::c_int = 16;
502505
pub const SO_PEERCRED: ::c_int = 17;
503506
pub const SO_RCVLOWAT: ::c_int = 18;
504507
pub const SO_SNDLOWAT: ::c_int = 19;
505508
pub const SO_ACCEPTCONN: ::c_int = 30;
509+
pub const SO_SNDBUFFORCE: ::c_int = 32;
506510

507511
pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
508512
pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
@@ -806,6 +810,47 @@ pub const TIOCM_DSR: ::c_int = 0x100;
806810
pub const TIOCM_CD: ::c_int = TIOCM_CAR;
807811
pub const TIOCM_RI: ::c_int = TIOCM_RNG;
808812

813+
pub const SIGEV_THREAD_ID: ::c_int = 4;
814+
815+
pub const B0: ::speed_t = 0o000000;
816+
pub const B50: ::speed_t = 0o000001;
817+
pub const B75: ::speed_t = 0o000002;
818+
pub const B110: ::speed_t = 0o000003;
819+
pub const B134: ::speed_t = 0o000004;
820+
pub const B150: ::speed_t = 0o000005;
821+
pub const B200: ::speed_t = 0o000006;
822+
pub const B300: ::speed_t = 0o000007;
823+
pub const B600: ::speed_t = 0o000010;
824+
pub const B1200: ::speed_t = 0o000011;
825+
pub const B1800: ::speed_t = 0o000012;
826+
pub const B2400: ::speed_t = 0o000013;
827+
pub const B4800: ::speed_t = 0o000014;
828+
pub const B9600: ::speed_t = 0o000015;
829+
pub const B19200: ::speed_t = 0o000016;
830+
pub const B38400: ::speed_t = 0o000017;
831+
pub const EXTA: ::speed_t = B19200;
832+
pub const EXTB: ::speed_t = B38400;
833+
pub const B57600: ::speed_t = 0o010001;
834+
pub const B115200: ::speed_t = 0o010002;
835+
pub const B230400: ::speed_t = 0o010003;
836+
pub const B460800: ::speed_t = 0o010004;
837+
pub const B500000: ::speed_t = 0o010005;
838+
pub const B576000: ::speed_t = 0o010006;
839+
pub const B921600: ::speed_t = 0o010007;
840+
pub const B1000000: ::speed_t = 0o010010;
841+
pub const B1152000: ::speed_t = 0o010011;
842+
pub const B1500000: ::speed_t = 0o010012;
843+
pub const B2000000: ::speed_t = 0o010013;
844+
pub const B2500000: ::speed_t = 0o010014;
845+
pub const B3000000: ::speed_t = 0o010015;
846+
pub const B3500000: ::speed_t = 0o010016;
847+
pub const B4000000: ::speed_t = 0o010017;
848+
849+
pub const POLLRDNORM: ::c_short = 0x040;
850+
pub const POLLWRNORM: ::c_short = 0x004;
851+
pub const POLLRDBAND: ::c_short = 0x080;
852+
pub const POLLWRBAND: ::c_short = 0x100;
853+
809854
#[link(name = "util")]
810855
extern {
811856
pub fn sysctl(name: *mut ::c_int,

0 commit comments

Comments
 (0)