diff --git a/libc-test/build.rs b/libc-test/build.rs index 977ff51c7f0fe..1dfa9b255eaa5 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -465,7 +465,9 @@ fn test_windows(target: &str) { match name { // FIXME: API error: // SIG_ERR type is "void (*)(int)", not "int" - "SIG_ERR" => true, + "SIG_ERR" | + // Similar for SIG_DFL/IGN/GET/SGE/ACK + "SIG_DFL" | "SIG_IGN" | "SIG_GET" | "SIG_SGE" | "SIG_ACK" => true, _ => false, } }); diff --git a/src/windows/mod.rs b/src/windows/mod.rs index a83babaed661d..f56ae3bcfc25f 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -233,7 +233,13 @@ pub const SIGSEGV: ::c_int = 11; pub const SIGTERM: ::c_int = 15; pub const SIGABRT: ::c_int = 22; pub const NSIG: ::c_int = 23; + pub const SIG_ERR: ::c_int = -1; +pub const SIG_DFL: ::sighandler_t = 0; +pub const SIG_IGN: ::sighandler_t = 1; +pub const SIG_GET: ::sighandler_t = 2; +pub const SIG_SGE: ::sighandler_t = 3; +pub const SIG_ACK: ::sighandler_t = 4; // inline comment below appeases style checker #[cfg(all(target_env = "msvc", feature = "rustc-dep-of-std"))] // " if "