From 155f9b7e7f36975240ef93f3daf983b228592a11 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Thu, 15 Aug 2019 08:11:13 -0700 Subject: Update libc crate to 0.2.62 This change updates the libc crate to version 0.2.62. Import subrepo libc/:libc at 37f8f8dc233a79ea9cc89b102aa30ff6e402fe94 --- libc/src/unix/solarish/mod.rs | 133 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 117 insertions(+), 16 deletions(-) (limited to 'libc/src/unix/solarish/mod.rs') diff --git a/libc/src/unix/solarish/mod.rs b/libc/src/unix/solarish/mod.rs index 49f76ea..7895614 100644 --- a/libc/src/unix/solarish/mod.rs +++ b/libc/src/unix/solarish/mod.rs @@ -31,9 +31,13 @@ pub type pthread_t = ::c_uint; pub type pthread_key_t = ::c_uint; pub type blksize_t = ::c_int; pub type nl_item = ::c_int; +pub type mqd_t = *mut ::c_void; pub type id_t = ::c_int; pub type idtype_t = ::c_uint; +pub type door_attr_t = ::c_uint; +pub type door_id_t = ::c_ulonglong; + #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} impl ::Copy for timezone {} @@ -210,15 +214,6 @@ s! { pub sa_mask: sigset_t, } - pub struct sigevent { - pub sigev_notify: ::c_int, - pub sigev_signo: ::c_int, - pub sigev_value: ::sigval, - pub ss_sp: *mut ::c_void, - pub sigev_notify_attributes: *const ::pthread_attr_t, - __sigev_pad2: ::c_int, - } - pub struct stack_t { pub ss_sp: *mut ::c_void, pub ss_size: ::size_t, @@ -331,6 +326,14 @@ s! { pub if_name: *mut ::c_char, } + pub struct mq_attr { + pub mq_flags: ::c_long, + pub mq_maxmsg: ::c_long, + pub mq_msgsize: ::c_long, + pub mq_curmsgs: ::c_long, + _pad: [::c_int; 4] + } + pub struct port_event { pub portev_events: ::c_int, pub portev_source: ::c_ushort, @@ -338,6 +341,11 @@ s! { pub portev_object: ::uintptr_t, pub portev_user: *mut ::c_void, } + + pub struct door_desc_t__d_data__d_desc { + pub d_descriptor: ::c_int, + pub d_id: ::door_id_t + } } s_no_extra_traits! { @@ -392,6 +400,34 @@ s_no_extra_traits! { pub sdl_slen: ::c_uchar, pub sdl_data: [::c_char; 244], } + + pub struct sigevent { + pub sigev_notify: ::c_int, + pub sigev_signo: ::c_int, + pub sigev_value: ::sigval, + pub ss_sp: *mut ::c_void, + pub sigev_notify_attributes: *const ::pthread_attr_t, + __sigev_pad2: ::c_int, + } + + pub union door_desc_t__d_data { + pub d_desc: door_desc_t__d_data__d_desc, + d_resv: [::c_int; 5], /* Check out /usr/include/sys/door.h */ + } + + pub struct door_desc_t { + pub d_attributes: door_attr_t, + pub d_data: door_desc_t__d_data, + } + + pub struct door_arg_t { + pub data_ptr: *const ::c_char, + pub data_size: ::size_t, + pub desc_ptr: *const door_desc_t, + pub dec_num: ::c_uint, + pub rbuf: *const ::c_char, + pub rsize: ::size_t, + } } cfg_if! { @@ -627,6 +663,40 @@ cfg_if! { self.sdl_data.hash(state); } } + + impl PartialEq for sigevent { + fn eq(&self, other: &sigevent) -> bool { + self.sigev_notify == other.sigev_notify + && self.sigev_signo == other.sigev_signo + && self.sigev_value == other.sigev_value + && self.ss_sp == other.ss_sp + && self.sigev_notify_attributes + == other.sigev_notify_attributes + } + } + impl Eq for sigevent {} + impl ::fmt::Debug for sigevent { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("sigevent") + .field("sigev_notify", &self.sigev_notify) + .field("sigev_signo", &self.sigev_signo) + .field("sigev_value", &self.sigev_value) + .field("ss_sp", &self.ss_sp) + .field("sigev_notify_attributes", + &self.sigev_notify_attributes) + .finish() + } + } + impl ::hash::Hash for sigevent { + fn hash(&self, state: &mut H) { + self.sigev_notify.hash(state); + self.sigev_signo.hash(state); + self.sigev_value.hash(state); + self.ss_sp.hash(state); + self.sigev_notify_attributes.hash(state); + } + } + } } @@ -1176,13 +1246,6 @@ pub const AF_TRILL: ::c_int = 31; pub const AF_PACKET: ::c_int = 32; pub const AF_LX_NETLINK: ::c_int = 33; -#[doc(hidden)] -#[deprecated( - since = "0.2.55", - note = "If you are using this report to: \ - https://github.com/rust-lang/libc/issues/665" -)] -pub const AF_MAX: ::c_int = 33; pub const SOCK_DGRAM: ::c_int = 1; pub const SOCK_STREAM: ::c_int = 2; pub const SOCK_RAW: ::c_int = 4; @@ -1937,6 +2000,31 @@ extern { pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; + pub fn mq_close(mqd: ::mqd_t) -> ::c_int; + pub fn mq_unlink(name: *const ::c_char) -> ::c_int; + pub fn mq_receive(mqd: ::mqd_t, + msg_ptr: *mut ::c_char, + msg_len: ::size_t, + msq_prio: *mut ::c_uint) -> ::ssize_t; + pub fn mq_timedreceive(mqd: ::mqd_t, + msg_ptr: *mut ::c_char, + msg_len: ::size_t, + msq_prio: *mut ::c_uint, + abs_timeout: *const ::timespec) -> ::ssize_t; + pub fn mq_send(mqd: ::mqd_t, + msg_ptr: *const ::c_char, + msg_len: ::size_t, + msq_prio: ::c_uint) -> ::c_int; + pub fn mq_timedsend(mqd: ::mqd_t, + msg_ptr: *const ::c_char, + msg_len: ::size_t, + msq_prio: ::c_uint, + abs_timeout: *const ::timespec) -> ::c_int; + pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; + pub fn mq_setattr(mqd: ::mqd_t, + newattr: *const ::mq_attr, + oldattr: *mut ::mq_attr) -> ::c_int; pub fn port_create() -> ::c_int; pub fn port_associate(port: ::c_int, source: ::c_int, object: ::uintptr_t, events: ::c_int, user: *mut ::c_void) -> ::c_int; @@ -2040,6 +2128,19 @@ extern { pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int; pub fn uname(buf: *mut ::utsname) -> ::c_int; pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; + pub fn door_call(d: ::c_int, params: *const door_arg_t) -> ::c_int; + pub fn door_return(data_ptr: *const ::c_char, + data_size: ::size_t, + desc_ptr: *const door_desc_t, + num_desc: ::c_uint); + pub fn door_create(server_procedure: extern fn(cookie: *const ::c_void, + argp: *const ::c_char, + arg_size: ::size_t, + dp: *const door_desc_t, + n_desc: ::c_uint), + cookie: *const ::c_void, + attributes: door_attr_t) -> ::c_int; + pub fn fattach(fildes: ::c_int, path: *const ::c_char) -> ::c_int; } mod compat; -- cgit v1.2.1