File tree 13 files changed +147
-2
lines changed
13 files changed +147
-2
lines changed Original file line number Diff line number Diff line change @@ -377,6 +377,10 @@ fn main() {
377
377
// FIXME: unskip it for next major release
378
378
"stat" | "stat64" if android => true ,
379
379
380
+ // These are tested as part of the linux_fcntl tests since there are
381
+ // header conflicts when including them with all the other structs.
382
+ "termios2" => true ,
383
+
380
384
_ => false
381
385
}
382
386
} ) ;
@@ -671,8 +675,7 @@ fn main() {
671
675
// fails on a lot of platforms.
672
676
let mut cfg = ctest:: TestGenerator :: new ( ) ;
673
677
cfg. skip_type ( |_| true )
674
- . skip_struct ( |_| true )
675
- . skip_fn ( |_| true ) ;
678
+ . skip_fn ( |_| true ) ;
676
679
if android || linux {
677
680
// musl defines these directly in `fcntl.h`
678
681
if musl {
@@ -695,8 +698,18 @@ fn main() {
695
698
_ => true ,
696
699
}
697
700
} ) ;
701
+ cfg. skip_struct ( |s| {
702
+ s != "termios2"
703
+ } ) ;
704
+ cfg. type_name ( move |ty, is_struct| {
705
+ match ty {
706
+ t if is_struct => format ! ( "struct {}" , t) ,
707
+ t => t. to_string ( ) ,
708
+ }
709
+ } ) ;
698
710
} else {
699
711
cfg. skip_const ( |_| true ) ;
712
+ cfg. skip_struct ( |_| true ) ;
700
713
}
701
714
cfg. generate ( "../src/lib.rs" , "linux_fcntl.rs" ) ;
702
715
}
Original file line number Diff line number Diff line change 84
84
pub c_cc: [ :: cc_t; :: NCCS ] ,
85
85
}
86
86
87
+ pub struct termios2 {
88
+ pub c_iflag: :: tcflag_t,
89
+ pub c_oflag: :: tcflag_t,
90
+ pub c_cflag: :: tcflag_t,
91
+ pub c_lflag: :: tcflag_t,
92
+ pub c_line: :: cc_t,
93
+ pub c_cc: [ :: cc_t; 19 ] ,
94
+ pub c_ispeed: :: speed_t,
95
+ pub c_ospeed: :: speed_t,
96
+ }
97
+
87
98
pub struct flock {
88
99
pub l_type: :: c_short,
89
100
pub l_whence: :: c_short,
Original file line number Diff line number Diff line change 25
25
__size: [ :: c_char; 32 ] ,
26
26
__align: [ :: c_long; 0 ] ,
27
27
}
28
+
29
+ pub struct termios2 {
30
+ pub c_iflag: :: tcflag_t,
31
+ pub c_oflag: :: tcflag_t,
32
+ pub c_cflag: :: tcflag_t,
33
+ pub c_lflag: :: tcflag_t,
34
+ pub c_line: :: cc_t,
35
+ pub c_cc: [ :: cc_t; 23 ] ,
36
+ pub c_ispeed: :: speed_t,
37
+ pub c_ospeed: :: speed_t,
38
+ }
28
39
}
29
40
30
41
pub const SFD_CLOEXEC : :: c_int = 0x080000 ;
Original file line number Diff line number Diff line change @@ -138,6 +138,17 @@ s! {
138
138
pub f_namemax: :: c_ulong,
139
139
__f_spare: [ :: c_int; 6 ] ,
140
140
}
141
+
142
+ pub struct termios2 {
143
+ pub c_iflag: :: tcflag_t,
144
+ pub c_oflag: :: tcflag_t,
145
+ pub c_cflag: :: tcflag_t,
146
+ pub c_lflag: :: tcflag_t,
147
+ pub c_line: :: cc_t,
148
+ pub c_cc: [ :: cc_t; 19 ] ,
149
+ pub c_ispeed: :: speed_t,
150
+ pub c_ospeed: :: speed_t,
151
+ }
141
152
}
142
153
143
154
pub const O_DIRECT : :: c_int = 0x10000 ;
Original file line number Diff line number Diff line change @@ -149,6 +149,17 @@ s! {
149
149
pub f_namemax: :: c_ulong,
150
150
__f_spare: [ :: c_int; 6 ] ,
151
151
}
152
+
153
+ pub struct termios2 {
154
+ pub c_iflag: :: tcflag_t,
155
+ pub c_oflag: :: tcflag_t,
156
+ pub c_cflag: :: tcflag_t,
157
+ pub c_lflag: :: tcflag_t,
158
+ pub c_line: :: cc_t,
159
+ pub c_cc: [ :: cc_t; 23 ] ,
160
+ pub c_ispeed: :: speed_t,
161
+ pub c_ospeed: :: speed_t,
162
+ }
152
163
}
153
164
154
165
pub const O_DIRECT : :: c_int = 0o100000 ;
Original file line number Diff line number Diff line change @@ -151,6 +151,17 @@ s! {
151
151
pub f_namemax: :: c_ulong,
152
152
__f_spare: [ :: c_int; 6 ] ,
153
153
}
154
+
155
+ pub struct termios2 {
156
+ pub c_iflag: :: tcflag_t,
157
+ pub c_oflag: :: tcflag_t,
158
+ pub c_cflag: :: tcflag_t,
159
+ pub c_lflag: :: tcflag_t,
160
+ pub c_line: :: cc_t,
161
+ pub c_cc: [ :: cc_t; 19 ] ,
162
+ pub c_ispeed: :: speed_t,
163
+ pub c_ospeed: :: speed_t,
164
+ }
154
165
}
155
166
156
167
pub const O_DIRECT : :: c_int = 0x4000 ;
Original file line number Diff line number Diff line change @@ -118,6 +118,17 @@ s! {
118
118
pub _pad: [ :: c_int; 29 ] ,
119
119
_align: [ usize ; 0 ] ,
120
120
}
121
+
122
+ pub struct termios2 {
123
+ pub c_iflag: :: tcflag_t,
124
+ pub c_oflag: :: tcflag_t,
125
+ pub c_cflag: :: tcflag_t,
126
+ pub c_lflag: :: tcflag_t,
127
+ pub c_line: :: cc_t,
128
+ pub c_cc: [ :: cc_t; 19 ] ,
129
+ pub c_ispeed: :: speed_t,
130
+ pub c_ospeed: :: speed_t,
131
+ }
121
132
}
122
133
123
134
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56 ;
Original file line number Diff line number Diff line change @@ -101,6 +101,17 @@ s! {
101
101
__glibc_reserved4: :: c_ulong,
102
102
__glibc_reserved5: :: c_ulong,
103
103
}
104
+
105
+ pub struct termios2 {
106
+ pub c_iflag: :: tcflag_t,
107
+ pub c_oflag: :: tcflag_t,
108
+ pub c_cflag: :: tcflag_t,
109
+ pub c_lflag: :: tcflag_t,
110
+ pub c_line: :: cc_t,
111
+ pub c_cc: [ :: cc_t; 19 ] ,
112
+ pub c_ispeed: :: speed_t,
113
+ pub c_ospeed: :: speed_t,
114
+ }
104
115
}
105
116
106
117
pub const O_DIRECT : :: c_int = 0x10000 ;
Original file line number Diff line number Diff line change @@ -200,6 +200,17 @@ s! {
200
200
__glibc_reserved4: :: c_ulong,
201
201
__glibc_reserved5: :: c_ulong,
202
202
}
203
+
204
+ pub struct termios2 {
205
+ pub c_iflag: :: tcflag_t,
206
+ pub c_oflag: :: tcflag_t,
207
+ pub c_cflag: :: tcflag_t,
208
+ pub c_lflag: :: tcflag_t,
209
+ pub c_line: :: cc_t,
210
+ pub c_cc: [ :: cc_t; 19 ] ,
211
+ pub c_ispeed: :: speed_t,
212
+ pub c_ospeed: :: speed_t,
213
+ }
203
214
}
204
215
205
216
pub const O_DIRECT : :: c_int = 0x4000 ;
Original file line number Diff line number Diff line change @@ -111,6 +111,17 @@ s! {
111
111
__unused4: :: c_ulong,
112
112
__unused5: :: c_ulong
113
113
}
114
+
115
+ pub struct termios2 {
116
+ pub c_iflag: :: tcflag_t,
117
+ pub c_oflag: :: tcflag_t,
118
+ pub c_cflag: :: tcflag_t,
119
+ pub c_lflag: :: tcflag_t,
120
+ pub c_line: :: cc_t,
121
+ pub c_cc: [ :: cc_t; 19 ] ,
122
+ pub c_ispeed: :: speed_t,
123
+ pub c_ospeed: :: speed_t,
124
+ }
114
125
}
115
126
116
127
pub const TIOCGSOFTCAR : :: c_ulong = 0x5419 ;
Original file line number Diff line number Diff line change @@ -111,6 +111,17 @@ s! {
111
111
__reserved1: :: c_ulong,
112
112
__reserved2: :: c_ulong
113
113
}
114
+
115
+ pub struct termios2 {
116
+ pub c_iflag: :: tcflag_t,
117
+ pub c_oflag: :: tcflag_t,
118
+ pub c_cflag: :: tcflag_t,
119
+ pub c_lflag: :: tcflag_t,
120
+ pub c_line: :: cc_t,
121
+ pub c_cc: [ :: cc_t; 19 ] ,
122
+ pub c_ispeed: :: speed_t,
123
+ pub c_ospeed: :: speed_t,
124
+ }
114
125
}
115
126
116
127
pub const TIOCGSOFTCAR : :: c_ulong = 0x40047464 ;
Original file line number Diff line number Diff line change @@ -212,6 +212,17 @@ s! {
212
212
__unused4: :: c_ulong,
213
213
__unused5: :: c_ulong
214
214
}
215
+
216
+ pub struct termios2 {
217
+ pub c_iflag: :: tcflag_t,
218
+ pub c_oflag: :: tcflag_t,
219
+ pub c_cflag: :: tcflag_t,
220
+ pub c_lflag: :: tcflag_t,
221
+ pub c_line: :: cc_t,
222
+ pub c_cc: [ :: cc_t; 19 ] ,
223
+ pub c_ispeed: :: speed_t,
224
+ pub c_ospeed: :: speed_t,
225
+ }
215
226
}
216
227
217
228
pub const TIOCGSOFTCAR : :: c_ulong = 0x5419 ;
Original file line number Diff line number Diff line change @@ -177,6 +177,17 @@ s! {
177
177
pub c_ospeed: :: speed_t,
178
178
}
179
179
180
+ pub struct termios2 {
181
+ pub c_iflag: :: tcflag_t,
182
+ pub c_oflag: :: tcflag_t,
183
+ pub c_cflag: :: tcflag_t,
184
+ pub c_lflag: :: tcflag_t,
185
+ pub c_line: :: cc_t,
186
+ pub c_cc: [ :: cc_t; 19 ] ,
187
+ pub c_ispeed: :: speed_t,
188
+ pub c_ospeed: :: speed_t,
189
+ }
190
+
180
191
pub struct sysinfo {
181
192
pub uptime: :: c_long,
182
193
pub loads: [ :: c_ulong; 3 ] ,
You can’t perform that action at this time.
0 commit comments