diff options
author | Daniel Mueller <deso@posteo.net> | 2019-05-24 18:07:22 -0700 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2019-05-24 18:07:22 -0700 |
commit | 82cf43dd887801b8b22b8aae8c02854d921915d5 (patch) | |
tree | b1bf3710bd07fe83e396a5db8563f3e6c5e85689 /libc/src/unix/notbsd/linux/other/b64 | |
parent | 06722702ea35434189d7de2b13a00209b2ebbd6d (diff) | |
download | nitrocli-82cf43dd887801b8b22b8aae8c02854d921915d5.tar.gz nitrocli-82cf43dd887801b8b22b8aae8c02854d921915d5.tar.bz2 |
Update libc crate to 0.2.55
This change updates the libc crate to version 0.2.55.
Import subrepo libc/:libc at caf17a0641d29dc624621177f5756804dd180c13
Diffstat (limited to 'libc/src/unix/notbsd/linux/other/b64')
-rw-r--r-- | libc/src/unix/notbsd/linux/other/b64/aarch64.rs | 2 | ||||
-rw-r--r-- | libc/src/unix/notbsd/linux/other/b64/sparc64.rs | 2 | ||||
-rw-r--r-- | libc/src/unix/notbsd/linux/other/b64/x86_64.rs | 144 |
3 files changed, 122 insertions, 26 deletions
diff --git a/libc/src/unix/notbsd/linux/other/b64/aarch64.rs b/libc/src/unix/notbsd/linux/other/b64/aarch64.rs index d6e37ff..3bd2e02 100644 --- a/libc/src/unix/notbsd/linux/other/b64/aarch64.rs +++ b/libc/src/unix/notbsd/linux/other/b64/aarch64.rs @@ -786,7 +786,6 @@ pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; pub const SYS_perf_event_open: ::c_long = 241; pub const SYS_accept4: ::c_long = 242; pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_arch_specific_syscall: ::c_long = 244; pub const SYS_wait4: ::c_long = 260; pub const SYS_prlimit64: ::c_long = 261; pub const SYS_fanotify_init: ::c_long = 262; @@ -818,7 +817,6 @@ pub const SYS_pwritev2: ::c_long = 287; pub const SYS_pkey_mprotect: ::c_long = 288; pub const SYS_pkey_alloc: ::c_long = 289; pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_syscalls: ::c_long = 291; #[link(name = "util")] extern { diff --git a/libc/src/unix/notbsd/linux/other/b64/sparc64.rs b/libc/src/unix/notbsd/linux/other/b64/sparc64.rs index 325c793..5d26865 100644 --- a/libc/src/unix/notbsd/linux/other/b64/sparc64.rs +++ b/libc/src/unix/notbsd/linux/other/b64/sparc64.rs @@ -495,7 +495,7 @@ pub const VEOL2: usize = 6; pub const VMIN: usize = 4; pub const IEXTEN: ::tcflag_t = 0x8000; pub const TOSTOP: ::tcflag_t = 0x100; -pub const FLUSHO: ::tcflag_t = 0x2000; +pub const FLUSHO: ::tcflag_t = 0x1000; pub const EXTPROC: ::tcflag_t = 0x10000; pub const TCGETS: ::c_ulong = 0x40245408; pub const TCSETS: ::c_ulong = 0x80245409; diff --git a/libc/src/unix/notbsd/linux/other/b64/x86_64.rs b/libc/src/unix/notbsd/linux/other/b64/x86_64.rs index 0d7137e..79f27e0 100644 --- a/libc/src/unix/notbsd/linux/other/b64/x86_64.rs +++ b/libc/src/unix/notbsd/linux/other/b64/x86_64.rs @@ -112,20 +112,6 @@ s! { __private: [u64; 12], } - pub struct user_fpregs_struct { - pub cwd: ::c_ushort, - pub swd: ::c_ushort, - pub ftw: ::c_ushort, - pub fop: ::c_ushort, - pub rip: ::c_ulonglong, - pub rdp: ::c_ulonglong, - pub mxcsr: ::c_uint, - pub mxcr_mask: ::c_uint, - pub st_space: [::c_uint; 32], - pub xmm_space: [::c_uint; 64], - padding: [::c_uint; 24], - } - pub struct user_regs_struct { pub r15: ::c_ulonglong, pub r14: ::c_ulonglong, @@ -184,15 +170,6 @@ s! { __private: [u64; 8], } - pub struct ucontext_t { - pub uc_flags: ::c_ulong, - pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, - pub uc_mcontext: mcontext_t, - pub uc_sigmask: ::sigset_t, - __private: [u8; 512], - } - pub struct ipc_perm { pub __key: ::key_t, pub uid: ::uid_t, @@ -232,6 +209,127 @@ s! { } } +s_no_extra_traits! { + pub struct user_fpregs_struct { + pub cwd: ::c_ushort, + pub swd: ::c_ushort, + pub ftw: ::c_ushort, + pub fop: ::c_ushort, + pub rip: ::c_ulonglong, + pub rdp: ::c_ulonglong, + pub mxcsr: ::c_uint, + pub mxcr_mask: ::c_uint, + pub st_space: [::c_uint; 32], + pub xmm_space: [::c_uint; 64], + padding: [::c_uint; 24], + } + + pub struct ucontext_t { + pub uc_flags: ::c_ulong, + pub uc_link: *mut ucontext_t, + pub uc_stack: ::stack_t, + pub uc_mcontext: mcontext_t, + pub uc_sigmask: ::sigset_t, + __private: [u8; 512], + __ssp: [::c_ulonglong; 4], + } +} + +cfg_if! { + if #[cfg(feature = "extra_traits")] { + impl PartialEq for user_fpregs_struct { + fn eq(&self, other: &user_fpregs_struct) -> bool { + self.cwd == other.cwd + && self.swd == other.swd + && self.ftw == other.ftw + && self.fop == other.fop + && self.rip == other.rip + && self.rdp == other.rdp + && self.mxcsr == other.mxcsr + && self.mxcr_mask == other.mxcr_mask + && self.st_space == other.st_space + && self + .xmm_space + .iter() + .zip(other.xmm_space.iter()) + .all(|(a,b)| a == b) + // Ignore padding field + } + } + + impl Eq for user_fpregs_struct {} + + impl ::fmt::Debug for user_fpregs_struct { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("user_fpregs_struct") + .field("cwd", &self.cwd) + .field("ftw", &self.ftw) + .field("fop", &self.fop) + .field("rip", &self.rip) + .field("rdp", &self.rdp) + .field("mxcsr", &self.mxcsr) + .field("mxcr_mask", &self.mxcr_mask) + .field("st_space", &self.st_space) + // FIXME: .field("xmm_space", &self.xmm_space) + // Ignore padding field + .finish() + } + } + + impl ::hash::Hash for user_fpregs_struct { + fn hash<H: ::hash::Hasher>(&self, state: &mut H) { + self.cwd.hash(state); + self.ftw.hash(state); + self.fop.hash(state); + self.rip.hash(state); + self.rdp.hash(state); + self.mxcsr.hash(state); + self.mxcr_mask.hash(state); + self.st_space.hash(state); + self.xmm_space.hash(state); + // Ignore padding field + } + } + + impl PartialEq for ucontext_t { + fn eq(&self, other: &ucontext_t) -> bool { + self.uc_flags == other.uc_flags + && self.uc_link == other.uc_link + && self.uc_stack == other.uc_stack + && self.uc_mcontext == other.uc_mcontext + && self.uc_sigmask == other.uc_sigmask + // Ignore __private field + } + } + + impl Eq for ucontext_t {} + + impl ::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("ucontext_t") + .field("uc_flags", &self.uc_flags) + .field("uc_link", &self.uc_link) + .field("uc_stack", &self.uc_stack) + .field("uc_mcontext", &self.uc_mcontext) + .field("uc_sigmask", &self.uc_sigmask) + // Ignore __private field + .finish() + } + } + + impl ::hash::Hash for ucontext_t { + fn hash<H: ::hash::Hasher>(&self, state: &mut H) { + self.uc_flags.hash(state); + self.uc_link.hash(state); + self.uc_stack.hash(state); + self.uc_mcontext.hash(state); + self.uc_sigmask.hash(state); + // Ignore __private field + } + } + } +} + pub const TIOCGSOFTCAR: ::c_ulong = 0x5419; pub const TIOCSSOFTCAR: ::c_ulong = 0x541A; |