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