2 // ignore-wasm32-bare no libc to test ffi with
4 // GetLastError doesn't seem to work with stack switching
9 pub fn SetLastError(err: usize);
10 pub fn GetLastError() -> usize;
19 kernel32::SetLastError(expected);
20 let actual = kernel32::GetLastError();
21 println!("actual = {}", actual);
22 assert_eq!(expected, actual);
26 #[cfg(any(target_os = "android",
27 target_os = "cloudabi",
28 target_os = "dragonfly",
29 target_os = "emscripten",
30 target_os = "freebsd",
34 target_os = "openbsd",
35 target_os = "vxworks",
36 target_os = "solaris"))]