File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
library/std/src/sys/windows/c
src/tools/generate-windows-sys/src Expand file tree Collapse file tree 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 {
42754275 * self
42764276 }
42774277}
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.
1111// ignore-tidy-filelength
1212"# ;
1313
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+
1417fn main ( ) -> io:: Result < ( ) > {
1518 let mut path: PathBuf =
1619 std:: env:: args_os ( ) . nth ( 1 ) . expect ( "a path to the rust repository is required" ) . into ( ) ;
@@ -32,6 +35,7 @@ fn main() -> io::Result<()> {
3235 let mut f = std:: fs:: File :: create ( & path) ?;
3336 f. write_all ( PRELUDE . as_bytes ( ) ) ?;
3437 f. write_all ( bindings. as_bytes ( ) ) ?;
38+ f. write_all ( ARM_SHIM . as_bytes ( ) ) ?;
3539
3640 Ok ( ( ) )
3741}
You can’t perform that action at this time.
0 commit comments