summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Matthias Schaefer <philipp.matthias.schaefer@posteo.de>2015-12-17 22:42:04 +0100
committerCarl Lerche <me@carllerche.com>2015-12-22 12:57:01 -0800
commiteb9718625708a951a615a18b6583561937875fd0 (patch)
tree68623f6fbcd431a0625aeaf054e8e71a47ee9d5a
parent1164ea7196994f98bc2423dd4ce73939d61ca69e (diff)
downloadnix-eb9718625708a951a615a18b6583561937875fd0.zip
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."
-rw-r--r--src/sys/signal.rs8
1 files changed, 8 insertions, 0 deletions
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")]