diff options
author | Daniel Mueller <deso@posteo.net> | 2019-08-15 08:11:13 -0700 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2019-08-15 08:11:13 -0700 |
commit | 155f9b7e7f36975240ef93f3daf983b228592a11 (patch) | |
tree | b407ef697d1241cdbc46bc0b5a8545c63a7bafad /libc/src/unix/haiku/mod.rs | |
parent | 49f5194e16db47b6de9847b79840c6fe35e0df8c (diff) | |
download | nitrocli-155f9b7e7f36975240ef93f3daf983b228592a11.tar.gz nitrocli-155f9b7e7f36975240ef93f3daf983b228592a11.tar.bz2 |
Update libc crate to 0.2.62
This change updates the libc crate to version 0.2.62.
Import subrepo libc/:libc at 37f8f8dc233a79ea9cc89b102aa30ff6e402fe94
Diffstat (limited to 'libc/src/unix/haiku/mod.rs')
-rw-r--r-- | libc/src/unix/haiku/mod.rs | 79 |
1 files changed, 64 insertions, 15 deletions
diff --git a/libc/src/unix/haiku/mod.rs b/libc/src/unix/haiku/mod.rs index be9a6cf..c8cf8ad 100644 --- a/libc/src/unix/haiku/mod.rs +++ b/libc/src/unix/haiku/mod.rs @@ -287,14 +287,6 @@ s! { sa_userdata: *mut ::c_void, } - pub struct sigevent { - pub sigev_notify: ::c_int, - pub sigev_signo: ::c_int, - pub sigev_value: ::sigval, - __unused1: *mut ::c_void, // actually a function pointer - pub sigev_notify_attributes: *mut ::pthread_attr_t, - } - pub struct sem_t { pub se_type: i32, pub se_named_id: i32, // this is actually a union @@ -329,6 +321,14 @@ s_no_extra_traits! { pub d_reclen: ::c_ushort, pub d_name: [::c_char; 1024], // Max length is _POSIX_PATH_MAX } + + pub struct sigevent { + pub sigev_notify: ::c_int, + pub sigev_signo: ::c_int, + pub sigev_value: ::sigval, + __unused1: *mut ::c_void, // actually a function pointer + pub sigev_notify_attributes: *mut ::pthread_attr_t, + } } cfg_if! { @@ -438,6 +438,36 @@ cfg_if! { self.d_name.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.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("sigev_notify_attributes", + &self.sigev_notify_attributes) + .finish() + } + } + impl ::hash::Hash for sigevent { + fn hash<H: ::hash::Hasher>(&self, state: &mut H) { + self.sigev_notify.hash(state); + self.sigev_signo.hash(state); + self.sigev_value.hash(state); + self.sigev_notify_attributes.hash(state); + } + } } } @@ -770,13 +800,6 @@ pub const AF_NOTIFY: ::c_int = 8; pub const AF_LOCAL: ::c_int = 9; pub const AF_UNIX: ::c_int = AF_LOCAL; pub const AF_BLUETOOTH: ::c_int = 10; -#[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 = 11; pub const IP_OPTIONS: ::c_int = 1; pub const IP_HDRINCL: ::c_int = 2; @@ -1153,6 +1176,31 @@ pub const TCIFLUSH: ::c_int = 0x01; pub const TCOFLUSH: ::c_int = 0x02; pub const TCIOFLUSH: ::c_int = 0x03; +pub const TCGETA: ::c_int = 0x8000; +pub const TCSETA: ::c_int = TCGETA + 1; +pub const TCSETAF: ::c_int = TCGETA + 2; +pub const TCSETAW: ::c_int = TCGETA + 3; +pub const TCWAITEVENT: ::c_int = TCGETA + 4; +pub const TCSBRK: ::c_int = TCGETA + 5; +pub const TCFLSH: ::c_int = TCGETA + 6; +pub const TCXONC: ::c_int = TCGETA + 7; +pub const TCQUERYCONNECTED: ::c_int = TCGETA + 8; +pub const TCGETBITS: ::c_int = TCGETA + 9; +pub const TCSETDTR: ::c_int = TCGETA + 10; +pub const TCSETRTS: ::c_int = TCGETA + 11; +pub const TIOCGWINSZ: ::c_int = TCGETA + 12; +pub const TIOCSWINSZ: ::c_int = TCGETA + 13; +pub const TCVTIME: ::c_int = TCGETA + 14; +pub const TIOCGPGRP: ::c_int = TCGETA + 15; +pub const TIOCSPGRP: ::c_int = TCGETA + 16; +pub const TIOCSCTTY: ::c_int = TCGETA + 17; +pub const TIOCMGET: ::c_int = TCGETA + 18; +pub const TIOCMSET: ::c_int = TCGETA + 19; +pub const TIOCSBRK: ::c_int = TCGETA + 20; +pub const TIOCCBRK: ::c_int = TCGETA + 21; +pub const TIOCMBIS: ::c_int = TCGETA + 22; +pub const TIOCMBIC: ::c_int = TCGETA + 23; + f! { pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { let fd = fd as usize; @@ -1219,6 +1267,7 @@ extern { pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; + pub fn _errnop() -> *mut ::c_int; pub fn abs(i: ::c_int) -> ::c_int; pub fn atof(s: *const ::c_char) -> ::c_double; |