diff options
author | Mackenzie Clark <mackenzie.a.z.c@gmail.com> | 2018-12-17 18:46:48 -0800 |
---|---|---|
committer | Mackenzie Clark <mackenzie.a.z.c@gmail.com> | 2018-12-17 19:31:31 -0800 |
commit | af19934f292ddd230f99dae52faf29c83cf8bb37 (patch) | |
tree | 1a06a1d880ce85d5f3e8495067c92a8587e9a4f6 | |
parent | 4c32b9f4b9c15ece4b22418d24d689a3efdb1d94 (diff) | |
download | rust-libc-af19934f292ddd230f99dae52faf29c83cf8bb37.tar.gz |
normalize to common name sighandler_t
-rw-r--r-- | libc-test/build.rs | 5 | ||||
-rw-r--r-- | src/windows/mod.rs | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 0f86cb6f90..ffab452301 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -373,8 +373,9 @@ fn main() { // Fixup a few types on windows that don't actually exist. "time64_t" if windows => "__time64_t".to_string(), "ssize_t" if windows => "SSIZE_T".to_string(), - "_crt_signal_t" if windows => "__p_sig_fn_t".to_string(), - + // windows + "sighandler_t" if windows && !mingw => "_crt_signal_t".to_string(), + "sighandler_t" if windows && mingw => "__p_sig_fn_t".to_string(), // OSX calls this something else "sighandler_t" if bsdlike => "sig_t".to_string(), diff --git a/src/windows/mod.rs b/src/windows/mod.rs index 8caef4ed7c..e4db343ec2 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -27,7 +27,7 @@ pub type ptrdiff_t = isize; pub type intptr_t = isize; pub type uintptr_t = usize; pub type ssize_t = isize; -pub type __p_sig_fn_t = usize; +pub type sighandler_t = usize; pub type c_char = i8; pub type c_long = i32; @@ -298,7 +298,7 @@ extern { pub fn rand() -> c_int; pub fn srand(seed: c_uint); - pub fn signal(signum: c_int, handler: __p_sig_fn_t) -> __p_sig_fn_t; + pub fn signal(signum: c_int, handler: sighandler_t) -> sighandler_t; pub fn raise(signum: c_int) -> c_int; #[link_name = "_chmod"] |