normalize to common name sighandler_t

This commit is contained in:
Mackenzie Clark 2018-12-17 18:46:48 -08:00
parent 4c32b9f4b9
commit af19934f29
2 changed files with 5 additions and 4 deletions

View File

@ -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(),

View File

@ -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"]