Skip to content

Commit af19934

Browse files
committed
normalize to common name sighandler_t
1 parent 4c32b9f commit af19934

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

libc-test/build.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,9 @@ fn main() {
373373
// Fixup a few types on windows that don't actually exist.
374374
"time64_t" if windows => "__time64_t".to_string(),
375375
"ssize_t" if windows => "SSIZE_T".to_string(),
376-
"_crt_signal_t" if windows => "__p_sig_fn_t".to_string(),
377-
376+
// windows
377+
"sighandler_t" if windows && !mingw => "_crt_signal_t".to_string(),
378+
"sighandler_t" if windows && mingw => "__p_sig_fn_t".to_string(),
378379
// OSX calls this something else
379380
"sighandler_t" if bsdlike => "sig_t".to_string(),
380381

src/windows/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub type ptrdiff_t = isize;
2727
pub type intptr_t = isize;
2828
pub type uintptr_t = usize;
2929
pub type ssize_t = isize;
30-
pub type __p_sig_fn_t = usize;
30+
pub type sighandler_t = usize;
3131

3232
pub type c_char = i8;
3333
pub type c_long = i32;
@@ -298,7 +298,7 @@ extern {
298298
pub fn rand() -> c_int;
299299
pub fn srand(seed: c_uint);
300300

301-
pub fn signal(signum: c_int, handler: __p_sig_fn_t) -> __p_sig_fn_t;
301+
pub fn signal(signum: c_int, handler: sighandler_t) -> sighandler_t;
302302
pub fn raise(signum: c_int) -> c_int;
303303

304304
#[link_name = "_chmod"]

0 commit comments

Comments
 (0)