Inject win arm32 shims into metadata generation · model-checking/verify-rust-std@00b4f61 (original) (raw)
`@@ -5,6 +5,7 @@ windows_targets::link!("advapi32.dll" "system" fn OpenProcessToken(processhandle
`
5
5
`windows_targets::link!("advapi32.dll" "system" "SystemFunction036" fn RtlGenRandom(randombuffer : *mut core::ffi::c_void, randombufferlength : u32) -> BOOLEAN);
`
6
6
`windows_targets::link!("kernel32.dll" "system" fn AcquireSRWLockExclusive(srwlock : *mut SRWLOCK));
`
7
7
`windows_targets::link!("kernel32.dll" "system" fn AcquireSRWLockShared(srwlock : *mut SRWLOCK));
`
``
8
`+
windows_targets::link!("kernel32.dll" "system" fn AddVectoredExceptionHandler(first : u32, handler : PVECTORED_EXCEPTION_HANDLER) -> *mut core::ffi::c_void);
`
8
9
`windows_targets::link!("kernel32.dll" "system" fn CancelIo(hfile : HANDLE) -> BOOL);
`
9
10
`windows_targets::link!("kernel32.dll" "system" fn CloseHandle(hobject : HANDLE) -> BOOL);
`
10
11
`windows_targets::link!("kernel32.dll" "system" fn CompareStringOrdinal(lpstring1 : PCWSTR, cchcount1 : i32, lpstring2 : PCWSTR, cchcount2 : i32, bignorecase : BOOL) -> COMPARESTRING_RESULT);
`
`@@ -113,6 +114,7 @@ windows_targets::link!("ws2_32.dll" "system" fn WSAGetLastError() -> WSA_ERROR);
`
113
114
`windows_targets::link!("ws2_32.dll" "system" fn WSARecv(s : SOCKET, lpbuffers : *const WSABUF, dwbuffercount : u32, lpnumberofbytesrecvd : *mut u32, lpflags : *mut u32, lpoverlapped : *mut OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32);
`
114
115
`windows_targets::link!("ws2_32.dll" "system" fn WSASend(s : SOCKET, lpbuffers : *const WSABUF, dwbuffercount : u32, lpnumberofbytessent : *mut u32, dwflags : u32, lpoverlapped : *mut OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32);
`
115
116
`windows_targets::link!("ws2_32.dll" "system" fn WSASocketW(af : i32, r#type : i32, protocol : i32, lpprotocolinfo : *const WSAPROTOCOL_INFOW, g : u32, dwflags : u32) -> SOCKET);
`
``
117
`+
windows_targets::link!("ws2_32.dll" "system" fn WSAStartup(wversionrequested : u16, lpwsadata : *mut WSADATA) -> i32);
`
116
118
`windows_targets::link!("ws2_32.dll" "system" fn accept(s : SOCKET, addr : *mut SOCKADDR, addrlen : *mut i32) -> SOCKET);
`
117
119
`windows_targets::link!("ws2_32.dll" "system" fn bind(s : SOCKET, name : *const SOCKADDR, namelen : i32) -> i32);
`
118
120
`windows_targets::link!("ws2_32.dll" "system" fn closesocket(s : SOCKET) -> i32);
`
`@@ -2283,6 +2285,12 @@ pub type EXCEPTION_DISPOSITION = i32;
`
2283
2285
`pub const EXCEPTION_MAXIMUM_PARAMETERS: u32 = 15u32;
`
2284
2286
`#[repr(C)]
`
2285
2287
`#[derive(Clone, Copy)]
`
``
2288
`+
pub struct EXCEPTION_POINTERS {
`
``
2289
`+
pub ExceptionRecord: *mut EXCEPTION_RECORD,
`
``
2290
`+
pub ContextRecord: *mut CONTEXT,
`
``
2291
`+
}
`
``
2292
`+
#[repr(C)]
`
``
2293
`+
#[derive(Clone, Copy)]
`
2286
2294
`pub struct EXCEPTION_RECORD {
`
2287
2295
`pub ExceptionCode: NTSTATUS,
`
2288
2296
`pub ExceptionFlags: u32,
`
`@@ -2859,6 +2867,8 @@ pub type PTIMERAPCROUTINE = Option<
`
2859
2867
`dwtimerhighvalue: u32,
`
2860
2868
`),
`
2861
2869
`>;
`
``
2870
`+
pub type PVECTORED_EXCEPTION_HANDLER =
`
``
2871
`+
Option<unsafe extern "system" fn(exceptioninfo: *mut EXCEPTION_POINTERS) -> i32>;
`
2862
2872
`pub type PWSTR = *mut u16;
`
2863
2873
`pub const READ_CONTROL: FILE_ACCESS_RIGHTS = 131072u32;
`
2864
2874
`pub const REALTIME_PRIORITY_CLASS: PROCESS_CREATION_FLAGS = 256u32;
`
`@@ -3283,5 +3293,19 @@ pub struct XSAVE_FORMAT {
`
3283
3293
`pub XmmRegisters: [M128A; 8],
`
3284
3294
`pub Reserved4: [u8; 224],
`
3285
3295
`}
`
``
3296
+
``
3297
`+
#[cfg(target_arch = "arm")]
`
``
3298
`+
#[repr(C)]
`
``
3299
`+
pub struct WSADATA {
`
``
3300
`+
pub wVersion: u16,
`
``
3301
`+
pub wHighVersion: u16,
`
``
3302
`+
pub szDescription: [u8; 257],
`
``
3303
`+
pub szSystemStatus: [u8; 129],
`
``
3304
`+
pub iMaxSockets: u16,
`
``
3305
`+
pub iMaxUdpDg: u16,
`
``
3306
`+
pub lpVendorInfo: PSTR,
`
``
3307
`+
}
`
``
3308
`+
#[cfg(target_arch = "arm")]
`
``
3309
`+
pub enum CONTEXT {}
`
3286
3310
`// ignore-tidy-filelength
`
3287
3311
`use super::windows_targets;
`