Skip to content

Commit

Permalink
Auto merge of #629 - Susurrus:tcflag_t, r=gnzlbg
Browse files Browse the repository at this point in the history
Correct datatype for various termios constants

This was a part of #625, but I moved it to a separate PR as it's a breaking change and those are currently blocked for Tier 1 platforms.
  • Loading branch information
bors committed May 28, 2019
2 parents 927ccfd + 8ff57d4 commit 5804b51
Show file tree
Hide file tree
Showing 18 changed files with 132 additions and 187 deletions.
56 changes: 28 additions & 28 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2471,34 +2471,34 @@ pub const NOTE_TRACK: ::uint32_t = 0x00000001;
pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
pub const NOTE_CHILD: ::uint32_t = 0x00000004;

pub const OCRNL: ::c_int = 0x00000010;
pub const ONOCR: ::c_int = 0x00000020;
pub const ONLRET: ::c_int = 0x00000040;
pub const OFILL: ::c_int = 0x00000080;
pub const NLDLY: ::c_int = 0x00000300;
pub const TABDLY: ::c_int = 0x00000c04;
pub const CRDLY: ::c_int = 0x00003000;
pub const FFDLY: ::c_int = 0x00004000;
pub const BSDLY: ::c_int = 0x00008000;
pub const VTDLY: ::c_int = 0x00010000;
pub const OFDEL: ::c_int = 0x00020000;

pub const NL0: ::c_int = 0x00000000;
pub const NL1: ::c_int = 0x00000100;
pub const TAB0: ::c_int = 0x00000000;
pub const TAB1: ::c_int = 0x00000400;
pub const TAB2: ::c_int = 0x00000800;
pub const CR0: ::c_int = 0x00000000;
pub const CR1: ::c_int = 0x00001000;
pub const CR2: ::c_int = 0x00002000;
pub const CR3: ::c_int = 0x00003000;
pub const FF0: ::c_int = 0x00000000;
pub const FF1: ::c_int = 0x00004000;
pub const BS0: ::c_int = 0x00000000;
pub const BS1: ::c_int = 0x00008000;
pub const TAB3: ::c_int = 0x00000004;
pub const VT0: ::c_int = 0x00000000;
pub const VT1: ::c_int = 0x00010000;
pub const OCRNL: ::tcflag_t = 0x00000010;
pub const ONOCR: ::tcflag_t = 0x00000020;
pub const ONLRET: ::tcflag_t = 0x00000040;
pub const OFILL: ::tcflag_t = 0x00000080;
pub const NLDLY: ::tcflag_t = 0x00000300;
pub const TABDLY: ::tcflag_t = 0x00000c04;
pub const CRDLY: ::tcflag_t = 0x00003000;
pub const FFDLY: ::tcflag_t = 0x00004000;
pub const BSDLY: ::tcflag_t = 0x00008000;
pub const VTDLY: ::tcflag_t = 0x00010000;
pub const OFDEL: ::tcflag_t = 0x00020000;

pub const NL0: ::tcflag_t = 0x00000000;
pub const NL1: ::tcflag_t = 0x00000100;
pub const TAB0: ::tcflag_t = 0x00000000;
pub const TAB1: ::tcflag_t = 0x00000400;
pub const TAB2: ::tcflag_t = 0x00000800;
pub const CR0: ::tcflag_t = 0x00000000;
pub const CR1: ::tcflag_t = 0x00001000;
pub const CR2: ::tcflag_t = 0x00002000;
pub const CR3: ::tcflag_t = 0x00003000;
pub const FF0: ::tcflag_t = 0x00000000;
pub const FF1: ::tcflag_t = 0x00004000;
pub const BS0: ::tcflag_t = 0x00000000;
pub const BS1: ::tcflag_t = 0x00008000;
pub const TAB3: ::tcflag_t = 0x00000004;
pub const VT0: ::tcflag_t = 0x00000000;
pub const VT1: ::tcflag_t = 0x00010000;
pub const IUTF8: ::tcflag_t = 0x00004000;
pub const CRTSCTS: ::tcflag_t = 0x00030000;

Expand Down
18 changes: 9 additions & 9 deletions src/unix/notbsd/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1161,15 +1161,15 @@ pub const MCL_CURRENT: ::c_int = 0x0001;
pub const MCL_FUTURE: ::c_int = 0x0002;

pub const CBAUD: ::tcflag_t = 0o0010017;
pub const TAB1: ::c_int = 0x00000800;
pub const TAB2: ::c_int = 0x00001000;
pub const TAB3: ::c_int = 0x00001800;
pub const CR1: ::c_int = 0x00000200;
pub const CR2: ::c_int = 0x00000400;
pub const CR3: ::c_int = 0x00000600;
pub const FF1: ::c_int = 0x00008000;
pub const BS1: ::c_int = 0x00002000;
pub const VT1: ::c_int = 0x00004000;
pub const TAB1: ::tcflag_t = 0x00000800;
pub const TAB2: ::tcflag_t = 0x00001000;
pub const TAB3: ::tcflag_t = 0x00001800;
pub const CR1: ::tcflag_t = 0x00000200;
pub const CR2: ::tcflag_t = 0x00000400;
pub const CR3: ::tcflag_t = 0x00000600;
pub const FF1: ::tcflag_t = 0x00008000;
pub const BS1: ::tcflag_t = 0x00002000;
pub const VT1: ::tcflag_t = 0x00004000;
pub const VWERASE: usize = 14;
pub const VREPRINT: usize = 12;
pub const VSUSP: usize = 10;
Expand Down
18 changes: 9 additions & 9 deletions src/unix/notbsd/linux/mips/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,15 +597,15 @@ pub const MCL_FUTURE: ::c_int = 0x0002;
pub const SIGSTKSZ: ::size_t = 8192;
pub const MINSIGSTKSZ: ::size_t = 2048;
pub const CBAUD: ::tcflag_t = 0o0010017;
pub const TAB1: ::c_int = 0x00000800;
pub const TAB2: ::c_int = 0x00001000;
pub const TAB3: ::c_int = 0x00001800;
pub const CR1: ::c_int = 0x00000200;
pub const CR2: ::c_int = 0x00000400;
pub const CR3: ::c_int = 0x00000600;
pub const FF1: ::c_int = 0x00008000;
pub const BS1: ::c_int = 0x00002000;
pub const VT1: ::c_int = 0x00004000;
pub const TAB1: ::tcflag_t = 0x00000800;
pub const TAB2: ::tcflag_t = 0x00001000;
pub const TAB3: ::tcflag_t = 0x00001800;
pub const CR1: ::tcflag_t = 0x00000200;
pub const CR2: ::tcflag_t = 0x00000400;
pub const CR3: ::tcflag_t = 0x00000600;
pub const FF1: ::tcflag_t = 0x00008000;
pub const BS1: ::tcflag_t = 0x00002000;
pub const VT1: ::tcflag_t = 0x00004000;
pub const VWERASE: usize = 14;
pub const VREPRINT: usize = 12;
pub const VSUSP: usize = 10;
Expand Down
11 changes: 0 additions & 11 deletions src/unix/notbsd/linux/musl/b32/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,6 @@ s! {
pub f_namemax: ::c_ulong,
__f_spare: [::c_int; 6],
}

pub struct termios2 {
pub c_iflag: ::tcflag_t,
pub c_oflag: ::tcflag_t,
pub c_cflag: ::tcflag_t,
pub c_lflag: ::tcflag_t,
pub c_line: ::cc_t,
pub c_cc: [::cc_t; 19],
pub c_ispeed: ::speed_t,
pub c_ospeed: ::speed_t,
}
}

pub const SIGSTKSZ: ::size_t = 8192;
Expand Down
11 changes: 0 additions & 11 deletions src/unix/notbsd/linux/musl/b32/mips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,6 @@ s! {
pub f_namemax: ::c_ulong,
__f_spare: [::c_int; 6],
}

pub struct termios2 {
pub c_iflag: ::tcflag_t,
pub c_oflag: ::tcflag_t,
pub c_cflag: ::tcflag_t,
pub c_lflag: ::tcflag_t,
pub c_line: ::cc_t,
pub c_cc: [::cc_t; 23],
pub c_ispeed: ::speed_t,
pub c_ospeed: ::speed_t,
}
}

pub const SIGSTKSZ: ::size_t = 8192;
Expand Down
11 changes: 0 additions & 11 deletions src/unix/notbsd/linux/musl/b32/powerpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,6 @@ s! {
pub f_namemax: ::c_ulong,
__f_spare: [::c_int; 6],
}

pub struct termios2 {
pub c_iflag: ::tcflag_t,
pub c_oflag: ::tcflag_t,
pub c_cflag: ::tcflag_t,
pub c_lflag: ::tcflag_t,
pub c_cc: [::cc_t; 19],
pub c_line: ::cc_t,
pub c_ispeed: ::speed_t,
pub c_ospeed: ::speed_t,
}
}

pub const MADV_SOFT_OFFLINE: ::c_int = 101;
Expand Down
11 changes: 0 additions & 11 deletions src/unix/notbsd/linux/musl/b32/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,6 @@ s! {
pub f_namemax: ::c_ulong,
__f_spare: [::c_int; 6],
}

pub struct termios2 {
pub c_iflag: ::tcflag_t,
pub c_oflag: ::tcflag_t,
pub c_cflag: ::tcflag_t,
pub c_lflag: ::tcflag_t,
pub c_line: ::cc_t,
pub c_cc: [::cc_t; 19],
pub c_ispeed: ::speed_t,
pub c_ospeed: ::speed_t,
}
}

s_no_extra_traits!{
Expand Down
11 changes: 0 additions & 11 deletions src/unix/notbsd/linux/musl/b64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,6 @@ s! {
pub _pad: [::c_int; 29],
_align: [usize; 0],
}

pub struct termios2 {
pub c_iflag: ::tcflag_t,
pub c_oflag: ::tcflag_t,
pub c_cflag: ::tcflag_t,
pub c_lflag: ::tcflag_t,
pub c_line: ::cc_t,
pub c_cc: [::cc_t; 19],
pub c_ispeed: ::speed_t,
pub c_ospeed: ::speed_t,
}
}

pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
Expand Down
18 changes: 9 additions & 9 deletions src/unix/notbsd/linux/other/b32/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ pub const MCL_FUTURE: ::c_int = 0x0002;
pub const SIGSTKSZ: ::size_t = 8192;
pub const MINSIGSTKSZ: ::size_t = 2048;
pub const CBAUD: ::tcflag_t = 0o0010017;
pub const TAB1: ::c_int = 0x00000800;
pub const TAB2: ::c_int = 0x00001000;
pub const TAB3: ::c_int = 0x00001800;
pub const CR1: ::c_int = 0x00000200;
pub const CR2: ::c_int = 0x00000400;
pub const CR3: ::c_int = 0x00000600;
pub const FF1: ::c_int = 0x00008000;
pub const BS1: ::c_int = 0x00002000;
pub const VT1: ::c_int = 0x00004000;
pub const TAB1: ::tcflag_t = 0x00000800;
pub const TAB2: ::tcflag_t = 0x00001000;
pub const TAB3: ::tcflag_t = 0x00001800;
pub const CR1: ::tcflag_t = 0x00000200;
pub const CR2: ::tcflag_t = 0x00000400;
pub const CR3: ::tcflag_t = 0x00000600;
pub const FF1: ::tcflag_t = 0x00008000;
pub const BS1: ::tcflag_t = 0x00002000;
pub const VT1: ::tcflag_t = 0x00004000;
pub const VWERASE: usize = 14;
pub const VREPRINT: usize = 12;
pub const VSUSP: usize = 10;
Expand Down
18 changes: 9 additions & 9 deletions src/unix/notbsd/linux/other/b32/powerpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ pub const MCL_FUTURE: ::c_int = 0x4000;
pub const SIGSTKSZ: ::size_t = 0x4000;
pub const MINSIGSTKSZ: ::size_t = 4096;
pub const CBAUD: ::tcflag_t = 0xff;
pub const TAB1: ::c_int = 0x400;
pub const TAB2: ::c_int = 0x800;
pub const TAB3: ::c_int = 0xc00;
pub const CR1: ::c_int = 0x1000;
pub const CR2: ::c_int = 0x2000;
pub const CR3: ::c_int = 0x3000;
pub const FF1: ::c_int = 0x4000;
pub const BS1: ::c_int = 0x8000;
pub const VT1: ::c_int = 0x10000;
pub const TAB1: ::tcflag_t = 0x400;
pub const TAB2: ::tcflag_t = 0x800;
pub const TAB3: ::tcflag_t = 0xc00;
pub const CR1: ::tcflag_t = 0x1000;
pub const CR2: ::tcflag_t = 0x2000;
pub const CR3: ::tcflag_t = 0x3000;
pub const FF1: ::tcflag_t = 0x4000;
pub const BS1: ::tcflag_t = 0x8000;
pub const VT1: ::tcflag_t = 0x10000;
pub const VWERASE: usize = 0xa;
pub const VREPRINT: usize = 0xb;
pub const VSUSP: usize = 0xc;
Expand Down
18 changes: 9 additions & 9 deletions src/unix/notbsd/linux/other/b32/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,15 @@ pub const MCL_FUTURE: ::c_int = 0x0002;
pub const SIGSTKSZ: ::size_t = 8192;
pub const MINSIGSTKSZ: ::size_t = 2048;
pub const CBAUD: ::tcflag_t = 0o0010017;
pub const TAB1: ::c_int = 0x00000800;
pub const TAB2: ::c_int = 0x00001000;
pub const TAB3: ::c_int = 0x00001800;
pub const CR1: ::c_int = 0x00000200;
pub const CR2: ::c_int = 0x00000400;
pub const CR3: ::c_int = 0x00000600;
pub const FF1: ::c_int = 0x00008000;
pub const BS1: ::c_int = 0x00002000;
pub const VT1: ::c_int = 0x00004000;
pub const TAB1: ::tcflag_t = 0x00000800;
pub const TAB2: ::tcflag_t = 0x00001000;
pub const TAB3: ::tcflag_t = 0x00001800;
pub const CR1: ::tcflag_t = 0x00000200;
pub const CR2: ::tcflag_t = 0x00000400;
pub const CR3: ::tcflag_t = 0x00000600;
pub const FF1: ::tcflag_t = 0x00008000;
pub const BS1: ::tcflag_t = 0x00002000;
pub const VT1: ::tcflag_t = 0x00004000;
pub const VWERASE: usize = 14;
pub const VREPRINT: usize = 12;
pub const VSUSP: usize = 10;
Expand Down
18 changes: 9 additions & 9 deletions src/unix/notbsd/linux/other/b64/aarch64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,15 +439,15 @@ pub const MCL_FUTURE: ::c_int = 0x0002;
pub const SIGSTKSZ: ::size_t = 16384;
pub const MINSIGSTKSZ: ::size_t = 5120;
pub const CBAUD: ::tcflag_t = 0o0010017;
pub const TAB1: ::c_int = 0x00000800;
pub const TAB2: ::c_int = 0x00001000;
pub const TAB3: ::c_int = 0x00001800;
pub const CR1: ::c_int = 0x00000200;
pub const CR2: ::c_int = 0x00000400;
pub const CR3: ::c_int = 0x00000600;
pub const FF1: ::c_int = 0x00008000;
pub const BS1: ::c_int = 0x00002000;
pub const VT1: ::c_int = 0x00004000;
pub const TAB1: ::tcflag_t = 0x00000800;
pub const TAB2: ::tcflag_t = 0x00001000;
pub const TAB3: ::tcflag_t = 0x00001800;
pub const CR1: ::tcflag_t = 0x00000200;
pub const CR2: ::tcflag_t = 0x00000400;
pub const CR3: ::tcflag_t = 0x00000600;
pub const FF1: ::tcflag_t = 0x00008000;
pub const BS1: ::tcflag_t = 0x00002000;
pub const VT1: ::tcflag_t = 0x00004000;
pub const VWERASE: usize = 14;
pub const VREPRINT: usize = 12;
pub const VSUSP: usize = 10;
Expand Down
18 changes: 9 additions & 9 deletions src/unix/notbsd/linux/other/b64/powerpc64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,15 +450,15 @@ pub const MCL_FUTURE: ::c_int = 0x4000;
pub const SIGSTKSZ: ::size_t = 0x4000;
pub const MINSIGSTKSZ: ::size_t = 4096;
pub const CBAUD: ::tcflag_t = 0xff;
pub const TAB1: ::c_int = 0x400;
pub const TAB2: ::c_int = 0x800;
pub const TAB3: ::c_int = 0xc00;
pub const CR1: ::c_int = 0x1000;
pub const CR2: ::c_int = 0x2000;
pub const CR3: ::c_int = 0x3000;
pub const FF1: ::c_int = 0x4000;
pub const BS1: ::c_int = 0x8000;
pub const VT1: ::c_int = 0x10000;
pub const TAB1: ::tcflag_t = 0x400;
pub const TAB2: ::tcflag_t = 0x800;
pub const TAB3: ::tcflag_t = 0xc00;
pub const CR1: ::tcflag_t = 0x1000;
pub const CR2: ::tcflag_t = 0x2000;
pub const CR3: ::tcflag_t = 0x3000;
pub const FF1: ::tcflag_t = 0x4000;
pub const BS1: ::tcflag_t = 0x8000;
pub const VT1: ::tcflag_t = 0x10000;
pub const VWERASE: usize = 0xa;
pub const VREPRINT: usize = 0xb;
pub const VSUSP: usize = 0xc;
Expand Down
18 changes: 9 additions & 9 deletions src/unix/notbsd/linux/other/b64/sparc64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,15 +404,15 @@ pub const MCL_FUTURE: ::c_int = 0x4000;
pub const SIGSTKSZ: ::size_t = 16384;
pub const MINSIGSTKSZ: ::size_t = 4096;
pub const CBAUD: ::tcflag_t = 0x0000100f;
pub const TAB1: ::c_int = 0x800;
pub const TAB2: ::c_int = 0x1000;
pub const TAB3: ::c_int = 0x1800;
pub const CR1: ::c_int = 0x200;
pub const CR2: ::c_int = 0x400;
pub const CR3: ::c_int = 0x600;
pub const FF1: ::c_int = 0x8000;
pub const BS1: ::c_int = 0x2000;
pub const VT1: ::c_int = 0x4000;
pub const TAB1: ::tcflag_t = 0x800;
pub const TAB2: ::tcflag_t = 0x1000;
pub const TAB3: ::tcflag_t = 0x1800;
pub const CR1: ::tcflag_t = 0x200;
pub const CR2: ::tcflag_t = 0x400;
pub const CR3: ::tcflag_t = 0x600;
pub const FF1: ::tcflag_t = 0x8000;
pub const BS1: ::tcflag_t = 0x2000;
pub const VT1: ::tcflag_t = 0x4000;
pub const VWERASE: usize = 0xe;
pub const VREPRINT: usize = 0xc;
pub const VSUSP: usize = 0xa;
Expand Down
18 changes: 9 additions & 9 deletions src/unix/notbsd/linux/other/b64/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,15 +605,15 @@ pub const MCL_FUTURE: ::c_int = 0x0002;
pub const SIGSTKSZ: ::size_t = 8192;
pub const MINSIGSTKSZ: ::size_t = 2048;
pub const CBAUD: ::tcflag_t = 0o0010017;
pub const TAB1: ::c_int = 0x00000800;
pub const TAB2: ::c_int = 0x00001000;
pub const TAB3: ::c_int = 0x00001800;
pub const CR1: ::c_int = 0x00000200;
pub const CR2: ::c_int = 0x00000400;
pub const CR3: ::c_int = 0x00000600;
pub const FF1: ::c_int = 0x00008000;
pub const BS1: ::c_int = 0x00002000;
pub const VT1: ::c_int = 0x00004000;
pub const TAB1: ::tcflag_t = 0x00000800;
pub const TAB2: ::tcflag_t = 0x00001000;
pub const TAB3: ::tcflag_t = 0x00001800;
pub const CR1: ::tcflag_t = 0x00000200;
pub const CR2: ::tcflag_t = 0x00000400;
pub const CR3: ::tcflag_t = 0x00000600;
pub const FF1: ::tcflag_t = 0x00008000;
pub const BS1: ::tcflag_t = 0x00002000;
pub const VT1: ::tcflag_t = 0x00004000;
pub const VWERASE: usize = 14;
pub const VREPRINT: usize = 12;
pub const VSUSP: usize = 10;
Expand Down
14 changes: 7 additions & 7 deletions src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -881,13 +881,13 @@ pub const TCOON: ::c_int = 1;
pub const TCIFLUSH: ::c_int = 0;
pub const TCOFLUSH: ::c_int = 1;
pub const TCIOFLUSH: ::c_int = 2;
pub const NL0: ::c_int = 0x00000000;
pub const NL1: ::c_int = 0x00000100;
pub const TAB0: ::c_int = 0x00000000;
pub const CR0: ::c_int = 0x00000000;
pub const FF0: ::c_int = 0x00000000;
pub const BS0: ::c_int = 0x00000000;
pub const VT0: ::c_int = 0x00000000;
pub const NL0: ::tcflag_t = 0x00000000;
pub const NL1: ::tcflag_t = 0x00000100;
pub const TAB0: ::tcflag_t = 0x00000000;
pub const CR0: ::tcflag_t = 0x00000000;
pub const FF0: ::tcflag_t = 0x00000000;
pub const BS0: ::tcflag_t = 0x00000000;
pub const VT0: ::tcflag_t = 0x00000000;
pub const VERASE: usize = 2;
pub const VKILL: usize = 3;
pub const VINTR: usize = 0;
Expand Down
Loading

0 comments on commit 5804b51

Please sign in to comment.