Skip to content
Snippets Groups Projects
Commit 313483ba authored by Mackenzie Clark's avatar Mackenzie Clark
Browse files

add signal and raise bindings

separate for gnu and msvc


scope resolve c_int

these types are not allowed, and more scope resolution


use size_t
parent ed8309bc
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,7 @@ fn main() {
cfg.header("windows.h");
cfg.header("process.h");
cfg.header("ws2ipdef.h");
cfg.header("signal.h");
if target.contains("gnu") {
cfg.header("ws2tcpip.h");
......
pub type __p_sig_fn_t = ::size_t;
pub const L_tmpnam: ::c_uint = 14;
pub const TMP_MAX: ::c_uint = 0x7fff;
pub const SIGINT: ::c_int = 2;
pub const SIGILL: ::c_int = 4;
pub const SIGFPE: ::c_int = 8;
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;
extern {
pub fn signal(signum: ::c_int, handler: __p_sig_fn_t) -> __p_sig_fn_t;
pub fn raise(signum: ::c_int) -> ::c_int;
pub fn strcasecmp(s1: *const ::c_char, s2: *const ::c_char) -> ::c_int;
pub fn strncasecmp(s1: *const ::c_char, s2: *const ::c_char,
n: ::size_t) -> ::c_int;
n: ::size_t) -> ::c_int;
}
pub type _crt_signal_t = ::size_t;
pub const L_tmpnam: ::c_uint = 260;
pub const TMP_MAX: ::c_uint = 0x7fff_ffff;
pub const SIGINT: ::c_int = 2;
pub const SIGILL: ::c_int = 4;
pub const SIGABRT: ::c_int = 22;
pub const SIGFPE: ::c_int = 8;
pub const SIGSEGV: ::c_int = 11;
pub const SIGTERM: ::c_int = 15;
pub const SIG_ERR: ::c_int = -1;
extern {
pub fn signal(signum: ::c_int, handler: _crt_signal_t) -> _crt_signal_t;
pub fn raise(signum: ::c_int) -> ::c_int;
#[link_name = "_stricmp"]
pub fn stricmp(s1: *const ::c_char, s2: *const ::c_char) -> ::c_int;
#[link_name = "_strnicmp"]
pub fn strnicmp(s1: *const ::c_char, s2: *const ::c_char,
n: ::size_t) -> ::c_int;
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment