aboutsummaryrefslogtreecommitdiff
path: root/libc/src/unix/bsd/mod.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-01-15 09:30:24 -0800
committerDaniel Mueller <deso@posteo.net>2018-01-15 09:30:24 -0800
commitd8a58488bd56ef9c09e167173124c3519bc7405d (patch)
treef52c843b4862a8ce80b3912805638be5846166fc /libc/src/unix/bsd/mod.rs
parent7e6a449f276cd85ebd9201ef1a62aff3bc4d1595 (diff)
downloadnitrocli-d8a58488bd56ef9c09e167173124c3519bc7405d.tar.gz
nitrocli-d8a58488bd56ef9c09e167173124c3519bc7405d.tar.bz2
Update libc crate to 0.2.36
Import subrepo libc/:libc at 16a0f4a3d6c836f88f50c58f5d0a74a32cbf0193
Diffstat (limited to 'libc/src/unix/bsd/mod.rs')
-rw-r--r--libc/src/unix/bsd/mod.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/libc/src/unix/bsd/mod.rs b/libc/src/unix/bsd/mod.rs
index 94b8576..b9a88f0 100644
--- a/libc/src/unix/bsd/mod.rs
+++ b/libc/src/unix/bsd/mod.rs
@@ -1,6 +1,5 @@
use dox::{mem, Option};
-pub type c_char = i8;
pub type wchar_t = i32;
pub type off_t = i64;
pub type useconds_t = u32;
@@ -299,6 +298,7 @@ pub const MDMBUF: ::tcflag_t = 0x00100000;
pub const WNOHANG: ::c_int = 0x00000001;
pub const WUNTRACED: ::c_int = 0x00000002;
+pub const RTLD_LAZY: ::c_int = 0x1;
pub const RTLD_NOW: ::c_int = 0x2;
pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void;
pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;
@@ -313,6 +313,12 @@ pub const TCP_MAXSEG: ::c_int = 2;
pub const PIPE_BUF: usize = 512;
+pub const POLLIN: ::c_short = 0x1;
+pub const POLLPRI: ::c_short = 0x2;
+pub const POLLOUT: ::c_short = 0x4;
+pub const POLLERR: ::c_short = 0x8;
+pub const POLLHUP: ::c_short = 0x10;
+pub const POLLNVAL: ::c_short = 0x20;
pub const POLLRDNORM: ::c_short = 0x040;
pub const POLLWRNORM: ::c_short = 0x004;
pub const POLLRDBAND: ::c_short = 0x080;
@@ -360,6 +366,10 @@ f! {
pub fn WCOREDUMP(status: ::c_int) -> bool {
(status & 0o200) != 0
}
+
+ pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
+ (cmd << 8) | (type_ & 0x00ff)
+ }
}
extern {
@@ -480,6 +490,9 @@ extern {
oldset: *mut sigset_t) -> ::c_int;
pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
+ #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+ link_name = "pthread_cancel$UNIX2003")]
+ pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;