File tree 3 files changed +38
-0
lines changed
library/std/src/sys/windows/c
src/tools/generate-windows-sys/src
3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -4275,3 +4275,20 @@ impl ::core::clone::Clone for XSAVE_FORMAT {
4275
4275
* self
4276
4276
}
4277
4277
}
4278
+ // Begin of ARM32 shim
4279
+ cfg_if:: cfg_if! {
4280
+ if #[ cfg( target_arch = "arm" ) ] {
4281
+ #[ repr( C ) ]
4282
+ pub struct WSADATA {
4283
+ pub wVersion: u16 ,
4284
+ pub wHighVersion: u16 ,
4285
+ pub szDescription: [ u8 ; 257 ] ,
4286
+ pub szSystemStatus: [ u8 ; 129 ] ,
4287
+ pub iMaxSockets: u16 ,
4288
+ pub iMaxUdpDg: u16 ,
4289
+ pub lpVendorInfo: PSTR ,
4290
+ }
4291
+ pub enum CONTEXT { }
4292
+ }
4293
+ }
4294
+ // End of ARM32 shim
Original file line number Diff line number Diff line change
1
+ // Begin of ARM32 shim
2
+ cfg_if:: cfg_if! {
3
+ if #[ cfg( target_arch = "arm" ) ] {
4
+ #[ repr( C ) ]
5
+ pub struct WSADATA {
6
+ pub wVersion: u16 ,
7
+ pub wHighVersion: u16 ,
8
+ pub szDescription: [ u8 ; 257 ] ,
9
+ pub szSystemStatus: [ u8 ; 129 ] ,
10
+ pub iMaxSockets: u16 ,
11
+ pub iMaxUdpDg: u16 ,
12
+ pub lpVendorInfo: PSTR ,
13
+ }
14
+ pub enum CONTEXT { }
15
+ }
16
+ }
17
+ // End of ARM32 shim
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ const PRELUDE: &str = r#"// This file is autogenerated.
11
11
// ignore-tidy-filelength
12
12
"# ;
13
13
14
+ /// This is a shim for the ARM (32-bit) architecture, which is no longer supported by windows-rs.
15
+ const ARM_SHIM : & str = include_str ! ( "arm_shim.rs" ) ;
16
+
14
17
fn main ( ) -> io:: Result < ( ) > {
15
18
let mut path: PathBuf =
16
19
std:: env:: args_os ( ) . nth ( 1 ) . expect ( "a path to the rust repository is required" ) . into ( ) ;
@@ -32,6 +35,7 @@ fn main() -> io::Result<()> {
32
35
let mut f = std:: fs:: File :: create ( & path) ?;
33
36
f. write_all ( PRELUDE . as_bytes ( ) ) ?;
34
37
f. write_all ( bindings. as_bytes ( ) ) ?;
38
+ f. write_all ( ARM_SHIM . as_bytes ( ) ) ?;
35
39
36
40
Ok ( ( ) )
37
41
}
You can’t perform that action at this time.
0 commit comments