From 6fbb8d59743024f1ffbcdfdd80cb71b069ea6a64 Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Mon, 20 Feb 2017 14:05:57 +0000 Subject: [PATCH 1/9] Added baudrate constants. --- src/unix/bsd/apple/mod.rs | 26 +++++++++++++++++++++++++ src/unix/bsd/freebsdlike/mod.rs | 28 +++++++++++++++++++++++++++ src/unix/bsd/netbsdlike/mod.rs | 26 +++++++++++++++++++++++++ src/unix/notbsd/mod.rs | 34 +++++++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+) diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 2dc43ddc0ae07..bbc9583f13d51 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -731,6 +731,32 @@ pub const TIOCPTYGRANT: ::c_uint = 0x20007454; pub const TIOCPTYGNAME: ::c_uint = 0x40807453; pub const TIOCPTYUNLK: ::c_uint = 0x20007452; +pub const B0: speed_t = 0; +pub const B50: speed_t = 50; +pub const B75: speed_t = 75; +pub const B110: speed_t = 110; +pub const B134: speed_t = 134; +pub const B150: speed_t = 150; +pub const B200: speed_t = 200; +pub const B300: speed_t = 300; +pub const B600: speed_t = 600; +pub const B1200: speed_t = 1200; +pub const B1800: speed_t = 1800; +pub const B2400: speed_t = 2400; +pub const B4800: speed_t = 4800; +pub const B9600: speed_t = 9600; +pub const B19200: speed_t = 19200; +pub const B38400: speed_t = 38400; +pub const B7200: speed_t = 7200; +pub const B14400: speed_t = 14400; +pub const B28800: speed_t = 28800; +pub const B57600: speed_t = 57600; +pub const B76800: speed_t = 76800; +pub const B115200: speed_t = 115200; +pub const B230400: speed_t = 230400; +pub const EXTA: speed_t = 19200; +pub const EXTB: speed_t = 38400; + pub const SIGTRAP: ::c_int = 5; pub const GLOB_APPEND : ::c_int = 0x0001; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 5f156c1716d53..b2ae267fa72c6 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -753,6 +753,34 @@ pub const SLIPDISC: ::c_int = 0x4; pub const PPPDISC: ::c_int = 0x5; pub const NETGRAPHDISC: ::c_int = 0x6; +pub const B0: speed_t = 0; +pub const B50: speed_t = 50; +pub const B75: speed_t = 75; +pub const B110: speed_t = 110; +pub const B134: speed_t = 134; +pub const B150: speed_t = 150; +pub const B200: speed_t = 200; +pub const B300: speed_t = 300; +pub const B600: speed_t = 600; +pub const B1200: speed_t = 1200; +pub const B1800: speed_t = 1800; +pub const B2400: speed_t = 2400; +pub const B4800: speed_t = 4800; +pub const B9600: speed_t = 9600; +pub const B19200: speed_t = 19200; +pub const B38400: speed_t = 38400; +pub const B7200: speed_t = 7200; +pub const B14400: speed_t = 14400; +pub const B28800: speed_t = 28800; +pub const B57600: speed_t = 57600; +pub const B76800: speed_t = 76800; +pub const B115200: speed_t = 115200; +pub const B230400: speed_t = 230400; +pub const B460800: speed_t = 460800; +pub const B921600: speed_t = 921600; +pub const EXTA: speed_t = 19200; +pub const EXTB: speed_t = 38400; + pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t; f! { diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index 6796180aac810..45754ed6830b6 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -451,6 +451,32 @@ pub const LOG_NFACILITIES: ::c_int = 24; pub const HW_NCPU: ::c_int = 3; +pub const B0: speed_t = 0; +pub const B50: speed_t = 50; +pub const B75: speed_t = 75; +pub const B110: speed_t = 110; +pub const B134: speed_t = 134; +pub const B150: speed_t = 150; +pub const B200: speed_t = 200; +pub const B300: speed_t = 300; +pub const B600: speed_t = 600; +pub const B1200: speed_t = 1200; +pub const B1800: speed_t = 1800; +pub const B2400: speed_t = 2400; +pub const B4800: speed_t = 4800; +pub const B9600: speed_t = 9600; +pub const B19200: speed_t = 19200; +pub const B38400: speed_t = 38400; +pub const B7200: speed_t = 7200; +pub const B14400: speed_t = 14400; +pub const B28800: speed_t = 28800; +pub const B57600: speed_t = 57600; +pub const B76800: speed_t = 76800; +pub const B115200: speed_t = 115200; +pub const B230400: speed_t = 230400; +pub const EXTA: speed_t = 19200; +pub const EXTB: speed_t = 38400; + pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t; f! { diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index 10aa0b5bcb21e..a9befca1c5c10 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -566,6 +566,40 @@ pub const CS5: ::tcflag_t = 0x00000000; pub const CRTSCTS: ::tcflag_t = 0x80000000; pub const ECHO: ::tcflag_t = 0x00000008; +pub const B0: speed_t = 0o000000; +pub const B50: speed_t = 0o000001; +pub const B75: speed_t = 0o000002; +pub const B110: speed_t = 0o000003; +pub const B134: speed_t = 0o000004; +pub const B150: speed_t = 0o000005; +pub const B200: speed_t = 0o000006; +pub const B300: speed_t = 0o000007; +pub const B600: speed_t = 0o000010; +pub const B1200: speed_t = 0o000011; +pub const B1800: speed_t = 0o000012; +pub const B2400: speed_t = 0o000013; +pub const B4800: speed_t = 0o000014; +pub const B9600: speed_t = 0o000015; +pub const B19200: speed_t = 0o000016; +pub const B38400: speed_t = 0o000017; +pub const EXTA: speed_t = B19200; +pub const EXTB: speed_t = B38400; +pub const B57600: speed_t = 0o010001; +pub const B115200: speed_t = 0o010002; +pub const B230400: speed_t = 0o010003; +pub const B460800: speed_t = 0o010004; +pub const B500000: speed_t = 0o010005; +pub const B576000: speed_t = 0o010006; +pub const B921600: speed_t = 0o010007; +pub const B1000000: speed_t = 0o010010; +pub const B1152000: speed_t = 0o010011; +pub const B1500000: speed_t = 0o010012; +pub const B2000000: speed_t = 0o010013; +pub const B2500000: speed_t = 0o010014; +pub const B3000000: speed_t = 0o010015; +pub const B3500000: speed_t = 0o010016; +pub const B4000000: speed_t = 0o010017; + pub const CLONE_VM: ::c_int = 0x100; pub const CLONE_FS: ::c_int = 0x200; pub const CLONE_FILES: ::c_int = 0x400; From e393a2d4a09ac7c3792c2545f49b16e1b6983021 Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Mon, 20 Feb 2017 20:49:19 +0000 Subject: [PATCH 2/9] Adding termios.h to openbsd headers. Attempting to correct for conflicting defines from `rpcsvc/rex.h` --- libc-test/build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/libc-test/build.rs b/libc-test/build.rs index fc4db1e9e132a..c7d7f88d0880c 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -206,6 +206,7 @@ fn main() { if openbsd { cfg.header("ufs/ufs/quota.h"); cfg.header("rpcsvc/rex.h"); + cfg.header("termios.h"); cfg.header("pthread_np.h"); cfg.header("sys/syscall.h"); } From 1a9112d2d82e86dd0f01c6cc454ac24badf54a8b Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Tue, 21 Feb 2017 00:06:31 +0000 Subject: [PATCH 3/9] Moved linux baud constants into individual archs. Having the B* constants in `unix/notbsd/mod.rs` passed CI tests except for powerpc. So we'll try moving into individual arch/ABI that the CI tests cover for now. This commit should pass for the following: - mips32 - mips64 - musl32 - musl64 - android32 - android64 - arm32 - aarch64 - x86 - x86_64 Then we can figure out the powerpc variants. This also prevents potential errors for sparc64 which is not covered by CI. --- src/unix/notbsd/android/mod.rs | 34 ++++++++++++++++++++++ src/unix/notbsd/linux/mips/mod.rs | 34 ++++++++++++++++++++++ src/unix/notbsd/linux/musl/mod.rs | 34 ++++++++++++++++++++++ src/unix/notbsd/linux/other/b32/arm.rs | 34 ++++++++++++++++++++++ src/unix/notbsd/linux/other/b32/x86.rs | 34 ++++++++++++++++++++++ src/unix/notbsd/linux/other/b64/aarch64.rs | 34 ++++++++++++++++++++++ src/unix/notbsd/linux/other/b64/x86_64.rs | 34 ++++++++++++++++++++++ src/unix/notbsd/mod.rs | 34 ---------------------- 8 files changed, 238 insertions(+), 34 deletions(-) diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index 4b4e26222ad62..c4ebc296a86d8 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -615,6 +615,40 @@ pub const ICANON: ::tcflag_t = 0x00000002; pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const B0: ::speed_t = 0o000000; +pub const B50: ::speed_t = 0o000001; +pub const B75: ::speed_t = 0o000002; +pub const B110: ::speed_t = 0o000003; +pub const B134: ::speed_t = 0o000004; +pub const B150: ::speed_t = 0o000005; +pub const B200: ::speed_t = 0o000006; +pub const B300: ::speed_t = 0o000007; +pub const B600: ::speed_t = 0o000010; +pub const B1200: ::speed_t = 0o000011; +pub const B1800: ::speed_t = 0o000012; +pub const B2400: ::speed_t = 0o000013; +pub const B4800: ::speed_t = 0o000014; +pub const B9600: ::speed_t = 0o000015; +pub const B19200: ::speed_t = 0o000016; +pub const B38400: ::speed_t = 0o000017; +pub const EXTA: ::speed_t = B19200; +pub const EXTB: ::speed_t = B38400; +pub const B57600: ::speed_t = 0o010001; +pub const B115200: ::speed_t = 0o010002; +pub const B230400: ::speed_t = 0o010003; +pub const B460800: ::speed_t = 0o010004; +pub const B500000: ::speed_t = 0o010005; +pub const B576000: ::speed_t = 0o010006; +pub const B921600: ::speed_t = 0o010007; +pub const B1000000: ::speed_t = 0o010010; +pub const B1152000: ::speed_t = 0o010011; +pub const B1500000: ::speed_t = 0o010012; +pub const B2000000: ::speed_t = 0o010013; +pub const B2500000: ::speed_t = 0o010014; +pub const B3000000: ::speed_t = 0o010015; +pub const B3500000: ::speed_t = 0o010016; +pub const B4000000: ::speed_t = 0o010017; + pub const EAI_SYSTEM: ::c_int = 11; pub const NETLINK_ROUTE: ::c_int = 0; diff --git a/src/unix/notbsd/linux/mips/mod.rs b/src/unix/notbsd/linux/mips/mod.rs index 48e773088e798..4393674d12e02 100644 --- a/src/unix/notbsd/linux/mips/mod.rs +++ b/src/unix/notbsd/linux/mips/mod.rs @@ -421,6 +421,40 @@ pub const ICANON: ::tcflag_t = 0x00000002; pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const B0: ::speed_t = 0o000000; +pub const B50: ::speed_t = 0o000001; +pub const B75: ::speed_t = 0o000002; +pub const B110: ::speed_t = 0o000003; +pub const B134: ::speed_t = 0o000004; +pub const B150: ::speed_t = 0o000005; +pub const B200: ::speed_t = 0o000006; +pub const B300: ::speed_t = 0o000007; +pub const B600: ::speed_t = 0o000010; +pub const B1200: ::speed_t = 0o000011; +pub const B1800: ::speed_t = 0o000012; +pub const B2400: ::speed_t = 0o000013; +pub const B4800: ::speed_t = 0o000014; +pub const B9600: ::speed_t = 0o000015; +pub const B19200: ::speed_t = 0o000016; +pub const B38400: ::speed_t = 0o000017; +pub const EXTA: ::speed_t = B19200; +pub const EXTB: ::speed_t = B38400; +pub const B57600: ::speed_t = 0o010001; +pub const B115200: ::speed_t = 0o010002; +pub const B230400: ::speed_t = 0o010003; +pub const B460800: ::speed_t = 0o010004; +pub const B500000: ::speed_t = 0o010005; +pub const B576000: ::speed_t = 0o010006; +pub const B921600: ::speed_t = 0o010007; +pub const B1000000: ::speed_t = 0o010010; +pub const B1152000: ::speed_t = 0o010011; +pub const B1500000: ::speed_t = 0o010012; +pub const B2000000: ::speed_t = 0o010013; +pub const B2500000: ::speed_t = 0o010014; +pub const B3000000: ::speed_t = 0o010015; +pub const B3500000: ::speed_t = 0o010016; +pub const B4000000: ::speed_t = 0o010017; + cfg_if! { if #[cfg(target_arch = "mips")] { mod mips32; diff --git a/src/unix/notbsd/linux/musl/mod.rs b/src/unix/notbsd/linux/musl/mod.rs index ff8e59b08aeb5..2bf13f92d5ab0 100644 --- a/src/unix/notbsd/linux/musl/mod.rs +++ b/src/unix/notbsd/linux/musl/mod.rs @@ -277,6 +277,40 @@ pub const ICANON: ::tcflag_t = 0x00000002; pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const B0: ::speed_t = 0o000000; +pub const B50: ::speed_t = 0o000001; +pub const B75: ::speed_t = 0o000002; +pub const B110: ::speed_t = 0o000003; +pub const B134: ::speed_t = 0o000004; +pub const B150: ::speed_t = 0o000005; +pub const B200: ::speed_t = 0o000006; +pub const B300: ::speed_t = 0o000007; +pub const B600: ::speed_t = 0o000010; +pub const B1200: ::speed_t = 0o000011; +pub const B1800: ::speed_t = 0o000012; +pub const B2400: ::speed_t = 0o000013; +pub const B4800: ::speed_t = 0o000014; +pub const B9600: ::speed_t = 0o000015; +pub const B19200: ::speed_t = 0o000016; +pub const B38400: ::speed_t = 0o000017; +pub const EXTA: ::speed_t = B19200; +pub const EXTB: ::speed_t = B38400; +pub const B57600: ::speed_t = 0o010001; +pub const B115200: ::speed_t = 0o010002; +pub const B230400: ::speed_t = 0o010003; +pub const B460800: ::speed_t = 0o010004; +pub const B500000: ::speed_t = 0o010005; +pub const B576000: ::speed_t = 0o010006; +pub const B921600: ::speed_t = 0o010007; +pub const B1000000: ::speed_t = 0o010010; +pub const B1152000: ::speed_t = 0o010011; +pub const B1500000: ::speed_t = 0o010012; +pub const B2000000: ::speed_t = 0o010013; +pub const B2500000: ::speed_t = 0o010014; +pub const B3000000: ::speed_t = 0o010015; +pub const B3500000: ::speed_t = 0o010016; +pub const B4000000: ::speed_t = 0o010017; + extern { pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; pub fn ptrace(request: ::c_int, ...) -> ::c_long; diff --git a/src/unix/notbsd/linux/other/b32/arm.rs b/src/unix/notbsd/linux/other/b32/arm.rs index 2c6fbcd6e3f26..cbd9e40ded382 100644 --- a/src/unix/notbsd/linux/other/b32/arm.rs +++ b/src/unix/notbsd/linux/other/b32/arm.rs @@ -141,6 +141,40 @@ pub const ICANON: ::tcflag_t = 0x00000002; pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const B0: ::speed_t = 0o000000; +pub const B50: ::speed_t = 0o000001; +pub const B75: ::speed_t = 0o000002; +pub const B110: ::speed_t = 0o000003; +pub const B134: ::speed_t = 0o000004; +pub const B150: ::speed_t = 0o000005; +pub const B200: ::speed_t = 0o000006; +pub const B300: ::speed_t = 0o000007; +pub const B600: ::speed_t = 0o000010; +pub const B1200: ::speed_t = 0o000011; +pub const B1800: ::speed_t = 0o000012; +pub const B2400: ::speed_t = 0o000013; +pub const B4800: ::speed_t = 0o000014; +pub const B9600: ::speed_t = 0o000015; +pub const B19200: ::speed_t = 0o000016; +pub const B38400: ::speed_t = 0o000017; +pub const EXTA: ::speed_t = B19200; +pub const EXTB: ::speed_t = B38400; +pub const B57600: ::speed_t = 0o010001; +pub const B115200: ::speed_t = 0o010002; +pub const B230400: ::speed_t = 0o010003; +pub const B460800: ::speed_t = 0o010004; +pub const B500000: ::speed_t = 0o010005; +pub const B576000: ::speed_t = 0o010006; +pub const B921600: ::speed_t = 0o010007; +pub const B1000000: ::speed_t = 0o010010; +pub const B1152000: ::speed_t = 0o010011; +pub const B1500000: ::speed_t = 0o010012; +pub const B2000000: ::speed_t = 0o010013; +pub const B2500000: ::speed_t = 0o010014; +pub const B3000000: ::speed_t = 0o010015; +pub const B3500000: ::speed_t = 0o010016; +pub const B4000000: ::speed_t = 0o010017; + pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; diff --git a/src/unix/notbsd/linux/other/b32/x86.rs b/src/unix/notbsd/linux/other/b32/x86.rs index 86abd1eb10358..466f046dd4a51 100644 --- a/src/unix/notbsd/linux/other/b32/x86.rs +++ b/src/unix/notbsd/linux/other/b32/x86.rs @@ -176,6 +176,40 @@ pub const ICANON: ::tcflag_t = 0x00000002; pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const B0: ::speed_t = 0o000000; +pub const B50: ::speed_t = 0o000001; +pub const B75: ::speed_t = 0o000002; +pub const B110: ::speed_t = 0o000003; +pub const B134: ::speed_t = 0o000004; +pub const B150: ::speed_t = 0o000005; +pub const B200: ::speed_t = 0o000006; +pub const B300: ::speed_t = 0o000007; +pub const B600: ::speed_t = 0o000010; +pub const B1200: ::speed_t = 0o000011; +pub const B1800: ::speed_t = 0o000012; +pub const B2400: ::speed_t = 0o000013; +pub const B4800: ::speed_t = 0o000014; +pub const B9600: ::speed_t = 0o000015; +pub const B19200: ::speed_t = 0o000016; +pub const B38400: ::speed_t = 0o000017; +pub const EXTA: ::speed_t = B19200; +pub const EXTB: ::speed_t = B38400; +pub const B57600: ::speed_t = 0o010001; +pub const B115200: ::speed_t = 0o010002; +pub const B230400: ::speed_t = 0o010003; +pub const B460800: ::speed_t = 0o010004; +pub const B500000: ::speed_t = 0o010005; +pub const B576000: ::speed_t = 0o010006; +pub const B921600: ::speed_t = 0o010007; +pub const B1000000: ::speed_t = 0o010010; +pub const B1152000: ::speed_t = 0o010011; +pub const B1500000: ::speed_t = 0o010012; +pub const B2000000: ::speed_t = 0o010013; +pub const B2500000: ::speed_t = 0o010014; +pub const B3000000: ::speed_t = 0o010015; +pub const B3500000: ::speed_t = 0o010016; +pub const B4000000: ::speed_t = 0o010017; + pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; diff --git a/src/unix/notbsd/linux/other/b64/aarch64.rs b/src/unix/notbsd/linux/other/b64/aarch64.rs index cb0e1a6979e0b..f9571bdc1f8b3 100644 --- a/src/unix/notbsd/linux/other/b64/aarch64.rs +++ b/src/unix/notbsd/linux/other/b64/aarch64.rs @@ -348,6 +348,40 @@ pub const ICANON: ::tcflag_t = 0x00000002; pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const B0: ::speed_t = 0o000000; +pub const B50: ::speed_t = 0o000001; +pub const B75: ::speed_t = 0o000002; +pub const B110: ::speed_t = 0o000003; +pub const B134: ::speed_t = 0o000004; +pub const B150: ::speed_t = 0o000005; +pub const B200: ::speed_t = 0o000006; +pub const B300: ::speed_t = 0o000007; +pub const B600: ::speed_t = 0o000010; +pub const B1200: ::speed_t = 0o000011; +pub const B1800: ::speed_t = 0o000012; +pub const B2400: ::speed_t = 0o000013; +pub const B4800: ::speed_t = 0o000014; +pub const B9600: ::speed_t = 0o000015; +pub const B19200: ::speed_t = 0o000016; +pub const B38400: ::speed_t = 0o000017; +pub const EXTA: ::speed_t = B19200; +pub const EXTB: ::speed_t = B38400; +pub const B57600: ::speed_t = 0o010001; +pub const B115200: ::speed_t = 0o010002; +pub const B230400: ::speed_t = 0o010003; +pub const B460800: ::speed_t = 0o010004; +pub const B500000: ::speed_t = 0o010005; +pub const B576000: ::speed_t = 0o010006; +pub const B921600: ::speed_t = 0o010007; +pub const B1000000: ::speed_t = 0o010010; +pub const B1152000: ::speed_t = 0o010011; +pub const B1500000: ::speed_t = 0o010012; +pub const B2000000: ::speed_t = 0o010013; +pub const B2500000: ::speed_t = 0o010014; +pub const B3000000: ::speed_t = 0o010015; +pub const B3500000: ::speed_t = 0o010016; +pub const B4000000: ::speed_t = 0o010017; + pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; diff --git a/src/unix/notbsd/linux/other/b64/x86_64.rs b/src/unix/notbsd/linux/other/b64/x86_64.rs index d7bf149caa7ee..f93c4f76f10bc 100644 --- a/src/unix/notbsd/linux/other/b64/x86_64.rs +++ b/src/unix/notbsd/linux/other/b64/x86_64.rs @@ -406,6 +406,40 @@ pub const ICANON: ::tcflag_t = 0x00000002; pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const B0: ::speed_t = 0o000000; +pub const B50: ::speed_t = 0o000001; +pub const B75: ::speed_t = 0o000002; +pub const B110: ::speed_t = 0o000003; +pub const B134: ::speed_t = 0o000004; +pub const B150: ::speed_t = 0o000005; +pub const B200: ::speed_t = 0o000006; +pub const B300: ::speed_t = 0o000007; +pub const B600: ::speed_t = 0o000010; +pub const B1200: ::speed_t = 0o000011; +pub const B1800: ::speed_t = 0o000012; +pub const B2400: ::speed_t = 0o000013; +pub const B4800: ::speed_t = 0o000014; +pub const B9600: ::speed_t = 0o000015; +pub const B19200: ::speed_t = 0o000016; +pub const B38400: ::speed_t = 0o000017; +pub const EXTA: ::speed_t = B19200; +pub const EXTB: ::speed_t = B38400; +pub const B57600: ::speed_t = 0o010001; +pub const B115200: ::speed_t = 0o010002; +pub const B230400: ::speed_t = 0o010003; +pub const B460800: ::speed_t = 0o010004; +pub const B500000: ::speed_t = 0o010005; +pub const B576000: ::speed_t = 0o010006; +pub const B921600: ::speed_t = 0o010007; +pub const B1000000: ::speed_t = 0o010010; +pub const B1152000: ::speed_t = 0o010011; +pub const B1500000: ::speed_t = 0o010012; +pub const B2000000: ::speed_t = 0o010013; +pub const B2500000: ::speed_t = 0o010014; +pub const B3000000: ::speed_t = 0o010015; +pub const B3500000: ::speed_t = 0o010016; +pub const B4000000: ::speed_t = 0o010017; + pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; diff --git a/src/unix/notbsd/mod.rs b/src/unix/notbsd/mod.rs index a9befca1c5c10..10aa0b5bcb21e 100644 --- a/src/unix/notbsd/mod.rs +++ b/src/unix/notbsd/mod.rs @@ -566,40 +566,6 @@ pub const CS5: ::tcflag_t = 0x00000000; pub const CRTSCTS: ::tcflag_t = 0x80000000; pub const ECHO: ::tcflag_t = 0x00000008; -pub const B0: speed_t = 0o000000; -pub const B50: speed_t = 0o000001; -pub const B75: speed_t = 0o000002; -pub const B110: speed_t = 0o000003; -pub const B134: speed_t = 0o000004; -pub const B150: speed_t = 0o000005; -pub const B200: speed_t = 0o000006; -pub const B300: speed_t = 0o000007; -pub const B600: speed_t = 0o000010; -pub const B1200: speed_t = 0o000011; -pub const B1800: speed_t = 0o000012; -pub const B2400: speed_t = 0o000013; -pub const B4800: speed_t = 0o000014; -pub const B9600: speed_t = 0o000015; -pub const B19200: speed_t = 0o000016; -pub const B38400: speed_t = 0o000017; -pub const EXTA: speed_t = B19200; -pub const EXTB: speed_t = B38400; -pub const B57600: speed_t = 0o010001; -pub const B115200: speed_t = 0o010002; -pub const B230400: speed_t = 0o010003; -pub const B460800: speed_t = 0o010004; -pub const B500000: speed_t = 0o010005; -pub const B576000: speed_t = 0o010006; -pub const B921600: speed_t = 0o010007; -pub const B1000000: speed_t = 0o010010; -pub const B1152000: speed_t = 0o010011; -pub const B1500000: speed_t = 0o010012; -pub const B2000000: speed_t = 0o010013; -pub const B2500000: speed_t = 0o010014; -pub const B3000000: speed_t = 0o010015; -pub const B3500000: speed_t = 0o010016; -pub const B4000000: speed_t = 0o010017; - pub const CLONE_VM: ::c_int = 0x100; pub const CLONE_FS: ::c_int = 0x200; pub const CLONE_FILES: ::c_int = 0x400; From 43e8557c056b703038c72d55001b5b6df635526b Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Tue, 21 Feb 2017 00:41:26 +0000 Subject: [PATCH 4/9] Added baud constants for powerpc --- src/unix/notbsd/linux/other/b32/powerpc.rs | 36 ++++++++++++++++++++ src/unix/notbsd/linux/other/b64/powerpc64.rs | 36 ++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/src/unix/notbsd/linux/other/b32/powerpc.rs b/src/unix/notbsd/linux/other/b32/powerpc.rs index 3125e9f337dd2..8597304f71b99 100644 --- a/src/unix/notbsd/linux/other/b32/powerpc.rs +++ b/src/unix/notbsd/linux/other/b32/powerpc.rs @@ -138,6 +138,42 @@ pub const ICANON: ::tcflag_t = 0x100; pub const PENDIN: ::tcflag_t = 0x20000000; pub const NOFLSH: ::tcflag_t = 0x80000000; +pub const B0: ::speed_t = 0o000000; +pub const B50: ::speed_t = 0o000001; +pub const B75: ::speed_t = 0o000002; +pub const B110: ::speed_t = 0o000003; +pub const B134: ::speed_t = 0o000004; +pub const B150: ::speed_t = 0o000005; +pub const B200: ::speed_t = 0o000006; +pub const B300: ::speed_t = 0o000007; +pub const B600: ::speed_t = 0o000010; +pub const B1200: ::speed_t = 0o000011; +pub const B1800: ::speed_t = 0o000012; +pub const B2400: ::speed_t = 0o000013; +pub const B4800: ::speed_t = 0o000014; +pub const B9600: ::speed_t = 0o000015; +pub const B19200: ::speed_t = 0o000016; +pub const B38400: ::speed_t = 0o000017; +pub const EXTA: ::speed_t = B19200; +pub const EXTB: ::speed_t = B38400; +pub const CBAUDEX: ::speed_t = 0o000000; +pub const B57600: ::speed_t = 0o0020; +pub const B115200: ::speed_t = 0o0021; +pub const B230400: ::speed_t = 0o0022; +pub const B460800: ::speed_t = 0o0023; +pub const B500000: ::speed_t = 0o0024; +pub const B576000: ::speed_t = 0o0025; +pub const B921600: ::speed_t = 0o0026; +pub const B1000000: ::speed_t = 0o0027; +pub const B1152000: ::speed_t = 0o0030; +pub const B1500000: ::speed_t = 0o0031; +pub const B2000000: ::speed_t = 0o0032; +pub const B2500000: ::speed_t = 0o0033; +pub const B3000000: ::speed_t = 0o0034; +pub const B3500000: ::speed_t = 0o0035; +pub const B4000000: ::speed_t = 0o0036; +pub const BOTHER: ::speed_t = 0o0037; + pub const VEOL: usize = 6; pub const VEOL2: usize = 8; pub const VMIN: usize = 5; diff --git a/src/unix/notbsd/linux/other/b64/powerpc64.rs b/src/unix/notbsd/linux/other/b64/powerpc64.rs index a5fad66dd1ea2..e955f8baf53a4 100644 --- a/src/unix/notbsd/linux/other/b64/powerpc64.rs +++ b/src/unix/notbsd/linux/other/b64/powerpc64.rs @@ -346,6 +346,42 @@ pub const ICANON: ::tcflag_t = 0x100; pub const PENDIN: ::tcflag_t = 0x20000000; pub const NOFLSH: ::tcflag_t = 0x80000000; +pub const B0: ::speed_t = 0o000000; +pub const B50: ::speed_t = 0o000001; +pub const B75: ::speed_t = 0o000002; +pub const B110: ::speed_t = 0o000003; +pub const B134: ::speed_t = 0o000004; +pub const B150: ::speed_t = 0o000005; +pub const B200: ::speed_t = 0o000006; +pub const B300: ::speed_t = 0o000007; +pub const B600: ::speed_t = 0o000010; +pub const B1200: ::speed_t = 0o000011; +pub const B1800: ::speed_t = 0o000012; +pub const B2400: ::speed_t = 0o000013; +pub const B4800: ::speed_t = 0o000014; +pub const B9600: ::speed_t = 0o000015; +pub const B19200: ::speed_t = 0o000016; +pub const B38400: ::speed_t = 0o000017; +pub const EXTA: ::speed_t = B19200; +pub const EXTB: ::speed_t = B38400; +pub const CBAUDEX: ::speed_t = 0o000000; +pub const B57600: ::speed_t = 0o0020; +pub const B115200: ::speed_t = 0o0021; +pub const B230400: ::speed_t = 0o0022; +pub const B460800: ::speed_t = 0o0023; +pub const B500000: ::speed_t = 0o0024; +pub const B576000: ::speed_t = 0o0025; +pub const B921600: ::speed_t = 0o0026; +pub const B1000000: ::speed_t = 0o0027; +pub const B1152000: ::speed_t = 0o0030; +pub const B1500000: ::speed_t = 0o0031; +pub const B2000000: ::speed_t = 0o0032; +pub const B2500000: ::speed_t = 0o0033; +pub const B3000000: ::speed_t = 0o0034; +pub const B3500000: ::speed_t = 0o0035; +pub const B4000000: ::speed_t = 0o0036; +pub const BOTHER: ::speed_t = 0o0037; + pub const VEOL: usize = 6; pub const VEOL2: usize = 8; pub const VMIN: usize = 5; From fb11c7a9ecfda5653b3d515fe0208f820c5fef0d Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Wed, 22 Feb 2017 10:30:50 +0000 Subject: [PATCH 5/9] Removed `BOTHER` const from powerpc and powerpc64 --- src/unix/notbsd/linux/other/b32/powerpc.rs | 1 - src/unix/notbsd/linux/other/b64/powerpc64.rs | 1 - 2 files changed, 2 deletions(-) diff --git a/src/unix/notbsd/linux/other/b32/powerpc.rs b/src/unix/notbsd/linux/other/b32/powerpc.rs index 8597304f71b99..fe5e57788126f 100644 --- a/src/unix/notbsd/linux/other/b32/powerpc.rs +++ b/src/unix/notbsd/linux/other/b32/powerpc.rs @@ -172,7 +172,6 @@ pub const B2500000: ::speed_t = 0o0033; pub const B3000000: ::speed_t = 0o0034; pub const B3500000: ::speed_t = 0o0035; pub const B4000000: ::speed_t = 0o0036; -pub const BOTHER: ::speed_t = 0o0037; pub const VEOL: usize = 6; pub const VEOL2: usize = 8; diff --git a/src/unix/notbsd/linux/other/b64/powerpc64.rs b/src/unix/notbsd/linux/other/b64/powerpc64.rs index e955f8baf53a4..380cf9be11f27 100644 --- a/src/unix/notbsd/linux/other/b64/powerpc64.rs +++ b/src/unix/notbsd/linux/other/b64/powerpc64.rs @@ -380,7 +380,6 @@ pub const B2500000: ::speed_t = 0o0033; pub const B3000000: ::speed_t = 0o0034; pub const B3500000: ::speed_t = 0o0035; pub const B4000000: ::speed_t = 0o0036; -pub const BOTHER: ::speed_t = 0o0037; pub const VEOL: usize = 6; pub const VEOL2: usize = 8; From e8fc9928cd16defaf6bc8cc68f4542420404a1a6 Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Fri, 24 Feb 2017 17:20:34 +0000 Subject: [PATCH 6/9] Removed "termios.h" from `build.rs` openbsd case. Adding `termios.h` behind `rpcsvc/rex.h` does not solve the #define clash since `rex.h` also defines the `_SYS_TERMIOS_H_` include guard. --- libc-test/build.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index c7d7f88d0880c..fc4db1e9e132a 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -206,7 +206,6 @@ fn main() { if openbsd { cfg.header("ufs/ufs/quota.h"); cfg.header("rpcsvc/rex.h"); - cfg.header("termios.h"); cfg.header("pthread_np.h"); cfg.header("sys/syscall.h"); } From bd6e72db5d6b3caf0e3fdc3415112acc944a1649 Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Fri, 24 Feb 2017 17:59:04 +0000 Subject: [PATCH 7/9] Changed CBAUDEX to 0o010000 for ppc and ppc64 --- src/unix/notbsd/linux/other/b32/powerpc.rs | 2 +- src/unix/notbsd/linux/other/b64/powerpc64.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/notbsd/linux/other/b32/powerpc.rs b/src/unix/notbsd/linux/other/b32/powerpc.rs index fe5e57788126f..bfcc7b6954dd4 100644 --- a/src/unix/notbsd/linux/other/b32/powerpc.rs +++ b/src/unix/notbsd/linux/other/b32/powerpc.rs @@ -156,7 +156,7 @@ pub const B19200: ::speed_t = 0o000016; pub const B38400: ::speed_t = 0o000017; pub const EXTA: ::speed_t = B19200; pub const EXTB: ::speed_t = B38400; -pub const CBAUDEX: ::speed_t = 0o000000; +pub const CBAUDEX: ::speed_t = 0o010000; pub const B57600: ::speed_t = 0o0020; pub const B115200: ::speed_t = 0o0021; pub const B230400: ::speed_t = 0o0022; diff --git a/src/unix/notbsd/linux/other/b64/powerpc64.rs b/src/unix/notbsd/linux/other/b64/powerpc64.rs index 380cf9be11f27..3148304618686 100644 --- a/src/unix/notbsd/linux/other/b64/powerpc64.rs +++ b/src/unix/notbsd/linux/other/b64/powerpc64.rs @@ -364,7 +364,7 @@ pub const B19200: ::speed_t = 0o000016; pub const B38400: ::speed_t = 0o000017; pub const EXTA: ::speed_t = B19200; pub const EXTB: ::speed_t = B38400; -pub const CBAUDEX: ::speed_t = 0o000000; +pub const CBAUDEX: ::speed_t = 0o010000; pub const B57600: ::speed_t = 0o0020; pub const B115200: ::speed_t = 0o0021; pub const B230400: ::speed_t = 0o0022; From 62ec26aacc6b0198de51c3bb34c253b2f997c024 Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Fri, 24 Feb 2017 18:17:22 +0000 Subject: [PATCH 8/9] Changed CBAUDEX to 0b000020 on ppc and ppc64 --- src/unix/notbsd/linux/other/b32/powerpc.rs | 2 +- src/unix/notbsd/linux/other/b64/powerpc64.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/notbsd/linux/other/b32/powerpc.rs b/src/unix/notbsd/linux/other/b32/powerpc.rs index bfcc7b6954dd4..d13c90f0c0f8d 100644 --- a/src/unix/notbsd/linux/other/b32/powerpc.rs +++ b/src/unix/notbsd/linux/other/b32/powerpc.rs @@ -156,7 +156,7 @@ pub const B19200: ::speed_t = 0o000016; pub const B38400: ::speed_t = 0o000017; pub const EXTA: ::speed_t = B19200; pub const EXTB: ::speed_t = B38400; -pub const CBAUDEX: ::speed_t = 0o010000; +pub const CBAUDEX: ::speed_t = 0o000020; pub const B57600: ::speed_t = 0o0020; pub const B115200: ::speed_t = 0o0021; pub const B230400: ::speed_t = 0o0022; diff --git a/src/unix/notbsd/linux/other/b64/powerpc64.rs b/src/unix/notbsd/linux/other/b64/powerpc64.rs index 3148304618686..4211a323b82c4 100644 --- a/src/unix/notbsd/linux/other/b64/powerpc64.rs +++ b/src/unix/notbsd/linux/other/b64/powerpc64.rs @@ -364,7 +364,7 @@ pub const B19200: ::speed_t = 0o000016; pub const B38400: ::speed_t = 0o000017; pub const EXTA: ::speed_t = B19200; pub const EXTB: ::speed_t = B38400; -pub const CBAUDEX: ::speed_t = 0o010000; +pub const CBAUDEX: ::speed_t = 0o000020; pub const B57600: ::speed_t = 0o0020; pub const B115200: ::speed_t = 0o0021; pub const B230400: ::speed_t = 0o0022; From 004814849dd4d45c07623045b51d2aec3bb803d7 Mon Sep 17 00:00:00 2001 From: Zac Berkowitz Date: Fri, 24 Feb 2017 18:51:51 +0000 Subject: [PATCH 9/9] Removed "rpcsvc/rex.h" from `build.rs` for OpenBSD ``` export TARGET=x86_64-unknown-openbsd export QEMU=openbsd.qcow2 sh ci/run-docker.sh $TARGET ``` Passes when run localy. --- libc-test/build.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index fc4db1e9e132a..2a9c028b4e4b9 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -205,7 +205,6 @@ fn main() { if openbsd { cfg.header("ufs/ufs/quota.h"); - cfg.header("rpcsvc/rex.h"); cfg.header("pthread_np.h"); cfg.header("sys/syscall.h"); }