From eb9718625708a951a615a18b6583561937875fd0 Mon Sep 17 00:00:00 2001 From: Philipp Matthias Schaefer Date: Thu, 17 Dec 2015 22:42:04 +0100 Subject: add NSIG constant glibc defines this constant as "the total number of signals defined. Since the signal numbers are allocated consecutively, NSIG is also one greater than the largest defined signal number." --- src/sys/signal.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/sys/signal.rs') diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 72cd17df..cf7ac519 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -41,6 +41,8 @@ pub use self::signal::{ SIGWINCH, SIGUSR1, SIGUSR2, + + NSIG, }; pub use self::signal::SockFlag; @@ -102,6 +104,8 @@ pub mod signal { pub const SIGSYS: libc::c_int = 31; pub const SIGUNUSED: libc::c_int = 31; + pub const NSIG: libc::c_int = 32; + // This definition is not as accurate as it could be, {pid, uid, status} is // actually a giant union. Currently we're only interested in these fields, // however. @@ -188,6 +192,8 @@ pub mod signal { pub const SIGXCPU: libc::c_int = 30; pub const SIGFSZ: libc::c_int = 31; + pub const NSIG: libc::c_int = 32; + // This definition is not as accurate as it could be, {pid, uid, status} is // actually a giant union. Currently we're only interested in these fields, // however. @@ -266,6 +272,8 @@ pub mod signal { pub const SIGUSR1: libc::c_int = 30; pub const SIGUSR2: libc::c_int = 31; + pub const NSIG: libc::c_int = 32; + #[cfg(any(target_os = "macos", target_os = "ios", target_os = "openbsd"))] pub type sigset_t = u32; #[cfg(target_os = "freebsd")] -- cgit v1.2.3