Skip to content

Commit 08d4488

Browse files
committed
Auto merge of #629 - Susurrus:tcflag_t, r=gnzlbg
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.
2 parents c9fbd00 + 8ff57d4 commit 08d4488

File tree

18 files changed

+132
-187
lines changed

18 files changed

+132
-187
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2471,34 +2471,34 @@ pub const NOTE_TRACK: ::uint32_t = 0x00000001;
24712471
pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
24722472
pub const NOTE_CHILD: ::uint32_t = 0x00000004;
24732473

2474-
pub const OCRNL: ::c_int = 0x00000010;
2475-
pub const ONOCR: ::c_int = 0x00000020;
2476-
pub const ONLRET: ::c_int = 0x00000040;
2477-
pub const OFILL: ::c_int = 0x00000080;
2478-
pub const NLDLY: ::c_int = 0x00000300;
2479-
pub const TABDLY: ::c_int = 0x00000c04;
2480-
pub const CRDLY: ::c_int = 0x00003000;
2481-
pub const FFDLY: ::c_int = 0x00004000;
2482-
pub const BSDLY: ::c_int = 0x00008000;
2483-
pub const VTDLY: ::c_int = 0x00010000;
2484-
pub const OFDEL: ::c_int = 0x00020000;
2485-
2486-
pub const NL0: ::c_int = 0x00000000;
2487-
pub const NL1: ::c_int = 0x00000100;
2488-
pub const TAB0: ::c_int = 0x00000000;
2489-
pub const TAB1: ::c_int = 0x00000400;
2490-
pub const TAB2: ::c_int = 0x00000800;
2491-
pub const CR0: ::c_int = 0x00000000;
2492-
pub const CR1: ::c_int = 0x00001000;
2493-
pub const CR2: ::c_int = 0x00002000;
2494-
pub const CR3: ::c_int = 0x00003000;
2495-
pub const FF0: ::c_int = 0x00000000;
2496-
pub const FF1: ::c_int = 0x00004000;
2497-
pub const BS0: ::c_int = 0x00000000;
2498-
pub const BS1: ::c_int = 0x00008000;
2499-
pub const TAB3: ::c_int = 0x00000004;
2500-
pub const VT0: ::c_int = 0x00000000;
2501-
pub const VT1: ::c_int = 0x00010000;
2474+
pub const OCRNL: ::tcflag_t = 0x00000010;
2475+
pub const ONOCR: ::tcflag_t = 0x00000020;
2476+
pub const ONLRET: ::tcflag_t = 0x00000040;
2477+
pub const OFILL: ::tcflag_t = 0x00000080;
2478+
pub const NLDLY: ::tcflag_t = 0x00000300;
2479+
pub const TABDLY: ::tcflag_t = 0x00000c04;
2480+
pub const CRDLY: ::tcflag_t = 0x00003000;
2481+
pub const FFDLY: ::tcflag_t = 0x00004000;
2482+
pub const BSDLY: ::tcflag_t = 0x00008000;
2483+
pub const VTDLY: ::tcflag_t = 0x00010000;
2484+
pub const OFDEL: ::tcflag_t = 0x00020000;
2485+
2486+
pub const NL0: ::tcflag_t = 0x00000000;
2487+
pub const NL1: ::tcflag_t = 0x00000100;
2488+
pub const TAB0: ::tcflag_t = 0x00000000;
2489+
pub const TAB1: ::tcflag_t = 0x00000400;
2490+
pub const TAB2: ::tcflag_t = 0x00000800;
2491+
pub const CR0: ::tcflag_t = 0x00000000;
2492+
pub const CR1: ::tcflag_t = 0x00001000;
2493+
pub const CR2: ::tcflag_t = 0x00002000;
2494+
pub const CR3: ::tcflag_t = 0x00003000;
2495+
pub const FF0: ::tcflag_t = 0x00000000;
2496+
pub const FF1: ::tcflag_t = 0x00004000;
2497+
pub const BS0: ::tcflag_t = 0x00000000;
2498+
pub const BS1: ::tcflag_t = 0x00008000;
2499+
pub const TAB3: ::tcflag_t = 0x00000004;
2500+
pub const VT0: ::tcflag_t = 0x00000000;
2501+
pub const VT1: ::tcflag_t = 0x00010000;
25022502
pub const IUTF8: ::tcflag_t = 0x00004000;
25032503
pub const CRTSCTS: ::tcflag_t = 0x00030000;
25042504

src/unix/notbsd/android/mod.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,15 +1161,15 @@ pub const MCL_CURRENT: ::c_int = 0x0001;
11611161
pub const MCL_FUTURE: ::c_int = 0x0002;
11621162

11631163
pub const CBAUD: ::tcflag_t = 0o0010017;
1164-
pub const TAB1: ::c_int = 0x00000800;
1165-
pub const TAB2: ::c_int = 0x00001000;
1166-
pub const TAB3: ::c_int = 0x00001800;
1167-
pub const CR1: ::c_int = 0x00000200;
1168-
pub const CR2: ::c_int = 0x00000400;
1169-
pub const CR3: ::c_int = 0x00000600;
1170-
pub const FF1: ::c_int = 0x00008000;
1171-
pub const BS1: ::c_int = 0x00002000;
1172-
pub const VT1: ::c_int = 0x00004000;
1164+
pub const TAB1: ::tcflag_t = 0x00000800;
1165+
pub const TAB2: ::tcflag_t = 0x00001000;
1166+
pub const TAB3: ::tcflag_t = 0x00001800;
1167+
pub const CR1: ::tcflag_t = 0x00000200;
1168+
pub const CR2: ::tcflag_t = 0x00000400;
1169+
pub const CR3: ::tcflag_t = 0x00000600;
1170+
pub const FF1: ::tcflag_t = 0x00008000;
1171+
pub const BS1: ::tcflag_t = 0x00002000;
1172+
pub const VT1: ::tcflag_t = 0x00004000;
11731173
pub const VWERASE: usize = 14;
11741174
pub const VREPRINT: usize = 12;
11751175
pub const VSUSP: usize = 10;

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -597,15 +597,15 @@ pub const MCL_FUTURE: ::c_int = 0x0002;
597597
pub const SIGSTKSZ: ::size_t = 8192;
598598
pub const MINSIGSTKSZ: ::size_t = 2048;
599599
pub const CBAUD: ::tcflag_t = 0o0010017;
600-
pub const TAB1: ::c_int = 0x00000800;
601-
pub const TAB2: ::c_int = 0x00001000;
602-
pub const TAB3: ::c_int = 0x00001800;
603-
pub const CR1: ::c_int = 0x00000200;
604-
pub const CR2: ::c_int = 0x00000400;
605-
pub const CR3: ::c_int = 0x00000600;
606-
pub const FF1: ::c_int = 0x00008000;
607-
pub const BS1: ::c_int = 0x00002000;
608-
pub const VT1: ::c_int = 0x00004000;
600+
pub const TAB1: ::tcflag_t = 0x00000800;
601+
pub const TAB2: ::tcflag_t = 0x00001000;
602+
pub const TAB3: ::tcflag_t = 0x00001800;
603+
pub const CR1: ::tcflag_t = 0x00000200;
604+
pub const CR2: ::tcflag_t = 0x00000400;
605+
pub const CR3: ::tcflag_t = 0x00000600;
606+
pub const FF1: ::tcflag_t = 0x00008000;
607+
pub const BS1: ::tcflag_t = 0x00002000;
608+
pub const VT1: ::tcflag_t = 0x00004000;
609609
pub const VWERASE: usize = 14;
610610
pub const VREPRINT: usize = 12;
611611
pub const VSUSP: usize = 10;

src/unix/notbsd/linux/musl/b32/arm.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,17 +150,6 @@ s! {
150150
pub f_namemax: ::c_ulong,
151151
__f_spare: [::c_int; 6],
152152
}
153-
154-
pub struct termios2 {
155-
pub c_iflag: ::tcflag_t,
156-
pub c_oflag: ::tcflag_t,
157-
pub c_cflag: ::tcflag_t,
158-
pub c_lflag: ::tcflag_t,
159-
pub c_line: ::cc_t,
160-
pub c_cc: [::cc_t; 19],
161-
pub c_ispeed: ::speed_t,
162-
pub c_ospeed: ::speed_t,
163-
}
164153
}
165154

166155
pub const SIGSTKSZ: ::size_t = 8192;

src/unix/notbsd/linux/musl/b32/mips.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,6 @@ s! {
161161
pub f_namemax: ::c_ulong,
162162
__f_spare: [::c_int; 6],
163163
}
164-
165-
pub struct termios2 {
166-
pub c_iflag: ::tcflag_t,
167-
pub c_oflag: ::tcflag_t,
168-
pub c_cflag: ::tcflag_t,
169-
pub c_lflag: ::tcflag_t,
170-
pub c_line: ::cc_t,
171-
pub c_cc: [::cc_t; 23],
172-
pub c_ispeed: ::speed_t,
173-
pub c_ospeed: ::speed_t,
174-
}
175164
}
176165

177166
pub const SIGSTKSZ: ::size_t = 8192;

src/unix/notbsd/linux/musl/b32/powerpc.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,6 @@ s! {
153153
pub f_namemax: ::c_ulong,
154154
__f_spare: [::c_int; 6],
155155
}
156-
157-
pub struct termios2 {
158-
pub c_iflag: ::tcflag_t,
159-
pub c_oflag: ::tcflag_t,
160-
pub c_cflag: ::tcflag_t,
161-
pub c_lflag: ::tcflag_t,
162-
pub c_cc: [::cc_t; 19],
163-
pub c_line: ::cc_t,
164-
pub c_ispeed: ::speed_t,
165-
pub c_ospeed: ::speed_t,
166-
}
167156
}
168157

169158
pub const MADV_SOFT_OFFLINE: ::c_int = 101;

src/unix/notbsd/linux/musl/b32/x86.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,6 @@ s! {
154154
pub f_namemax: ::c_ulong,
155155
__f_spare: [::c_int; 6],
156156
}
157-
158-
pub struct termios2 {
159-
pub c_iflag: ::tcflag_t,
160-
pub c_oflag: ::tcflag_t,
161-
pub c_cflag: ::tcflag_t,
162-
pub c_lflag: ::tcflag_t,
163-
pub c_line: ::cc_t,
164-
pub c_cc: [::cc_t; 19],
165-
pub c_ispeed: ::speed_t,
166-
pub c_ospeed: ::speed_t,
167-
}
168157
}
169158

170159
s_no_extra_traits!{

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,6 @@ s! {
127127
pub _pad: [::c_int; 29],
128128
_align: [usize; 0],
129129
}
130-
131-
pub struct termios2 {
132-
pub c_iflag: ::tcflag_t,
133-
pub c_oflag: ::tcflag_t,
134-
pub c_cflag: ::tcflag_t,
135-
pub c_lflag: ::tcflag_t,
136-
pub c_line: ::cc_t,
137-
pub c_cc: [::cc_t; 19],
138-
pub c_ispeed: ::speed_t,
139-
pub c_ospeed: ::speed_t,
140-
}
141130
}
142131

143132
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;

src/unix/notbsd/linux/other/b32/arm.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ pub const MCL_FUTURE: ::c_int = 0x0002;
142142
pub const SIGSTKSZ: ::size_t = 8192;
143143
pub const MINSIGSTKSZ: ::size_t = 2048;
144144
pub const CBAUD: ::tcflag_t = 0o0010017;
145-
pub const TAB1: ::c_int = 0x00000800;
146-
pub const TAB2: ::c_int = 0x00001000;
147-
pub const TAB3: ::c_int = 0x00001800;
148-
pub const CR1: ::c_int = 0x00000200;
149-
pub const CR2: ::c_int = 0x00000400;
150-
pub const CR3: ::c_int = 0x00000600;
151-
pub const FF1: ::c_int = 0x00008000;
152-
pub const BS1: ::c_int = 0x00002000;
153-
pub const VT1: ::c_int = 0x00004000;
145+
pub const TAB1: ::tcflag_t = 0x00000800;
146+
pub const TAB2: ::tcflag_t = 0x00001000;
147+
pub const TAB3: ::tcflag_t = 0x00001800;
148+
pub const CR1: ::tcflag_t = 0x00000200;
149+
pub const CR2: ::tcflag_t = 0x00000400;
150+
pub const CR3: ::tcflag_t = 0x00000600;
151+
pub const FF1: ::tcflag_t = 0x00008000;
152+
pub const BS1: ::tcflag_t = 0x00002000;
153+
pub const VT1: ::tcflag_t = 0x00004000;
154154
pub const VWERASE: usize = 14;
155155
pub const VREPRINT: usize = 12;
156156
pub const VSUSP: usize = 10;

src/unix/notbsd/linux/other/b32/powerpc.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ pub const MCL_FUTURE: ::c_int = 0x4000;
132132
pub const SIGSTKSZ: ::size_t = 0x4000;
133133
pub const MINSIGSTKSZ: ::size_t = 4096;
134134
pub const CBAUD: ::tcflag_t = 0xff;
135-
pub const TAB1: ::c_int = 0x400;
136-
pub const TAB2: ::c_int = 0x800;
137-
pub const TAB3: ::c_int = 0xc00;
138-
pub const CR1: ::c_int = 0x1000;
139-
pub const CR2: ::c_int = 0x2000;
140-
pub const CR3: ::c_int = 0x3000;
141-
pub const FF1: ::c_int = 0x4000;
142-
pub const BS1: ::c_int = 0x8000;
143-
pub const VT1: ::c_int = 0x10000;
135+
pub const TAB1: ::tcflag_t = 0x400;
136+
pub const TAB2: ::tcflag_t = 0x800;
137+
pub const TAB3: ::tcflag_t = 0xc00;
138+
pub const CR1: ::tcflag_t = 0x1000;
139+
pub const CR2: ::tcflag_t = 0x2000;
140+
pub const CR3: ::tcflag_t = 0x3000;
141+
pub const FF1: ::tcflag_t = 0x4000;
142+
pub const BS1: ::tcflag_t = 0x8000;
143+
pub const VT1: ::tcflag_t = 0x10000;
144144
pub const VWERASE: usize = 0xa;
145145
pub const VREPRINT: usize = 0xb;
146146
pub const VSUSP: usize = 0xc;

0 commit comments

Comments
 (0)