Skip to content

libc: use more accurate type of sighandler_t on windows #4602

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub type ptrdiff_t = isize;
pub type intptr_t = isize;
pub type uintptr_t = usize;
pub type ssize_t = isize;
pub type sighandler_t = usize;
pub type sighandler_t = *const c_void;

pub type wchar_t = u16;

Expand Down Expand Up @@ -237,11 +237,11 @@ pub const SIGABRT: c_int = 22;
pub const NSIG: c_int = 23;

pub const SIG_ERR: c_int = -1;
pub const SIG_DFL: crate::sighandler_t = 0;
pub const SIG_IGN: crate::sighandler_t = 1;
pub const SIG_GET: crate::sighandler_t = 2;
pub const SIG_SGE: crate::sighandler_t = 3;
pub const SIG_ACK: crate::sighandler_t = 4;
pub const SIG_DFL: crate::sighandler_t = 0 as sighandler_t;
pub const SIG_IGN: crate::sighandler_t = 1 as sighandler_t;
pub const SIG_GET: crate::sighandler_t = 2 as sighandler_t;
pub const SIG_SGE: crate::sighandler_t = 3 as sighandler_t;
pub const SIG_ACK: crate::sighandler_t = 4 as sighandler_t;

#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum FILE {}
Expand Down
Loading