diff options
author | Daniel Mueller <deso@posteo.net> | 2019-06-01 11:46:58 -0700 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2019-06-01 11:46:58 -0700 |
commit | 61f2baa0af6b2a54e0c109e5f73c8ff25f9f2ca6 (patch) | |
tree | 7526c0aca9a6ec34826a55cad24dd4a3457364f0 /libc/src/unix/uclibc | |
parent | 7c880699bb9a49037c09b1be990e677a1857af7a (diff) | |
download | nitrocli-61f2baa0af6b2a54e0c109e5f73c8ff25f9f2ca6.tar.gz nitrocli-61f2baa0af6b2a54e0c109e5f73c8ff25f9f2ca6.tar.bz2 |
Update libc crate to 0.2.57
This change updates the libc crate to version 0.2.57.
Import subrepo libc/:libc at cdc48ea36d8d2890dba38e8f779001e6855339a2
Diffstat (limited to 'libc/src/unix/uclibc')
-rw-r--r-- | libc/src/unix/uclibc/arm/mod.rs | 20 | ||||
-rw-r--r-- | libc/src/unix/uclibc/mips/mod.rs | 18 | ||||
-rw-r--r-- | libc/src/unix/uclibc/mod.rs | 175 |
3 files changed, 142 insertions, 71 deletions
diff --git a/libc/src/unix/uclibc/arm/mod.rs b/libc/src/unix/uclibc/arm/mod.rs index b250fb5..1651285 100644 --- a/libc/src/unix/uclibc/arm/mod.rs +++ b/libc/src/unix/uclibc/arm/mod.rs @@ -462,16 +462,16 @@ pub const POLLRDBAND: ::c_short = 0x80; pub const POLLRDNORM: ::c_short = 0x40; pub const POLLWRBAND: ::c_short = 0x200; pub const POLLWRNORM: ::c_short = 0x100; -pub const QIF_ALL: ::uint32_t = 0x3f; -pub const QIF_BLIMITS: ::uint32_t = 0x1; -pub const QIF_BTIME: ::uint32_t = 0x10; -pub const QIF_ILIMITS: ::uint32_t = 0x4; -pub const QIF_INODES: ::uint32_t = 0x8; -pub const QIF_ITIME: ::uint32_t = 0x20; -pub const QIF_LIMITS: ::uint32_t = 0x5; -pub const QIF_SPACE: ::uint32_t = 0x2; -pub const QIF_TIMES: ::uint32_t = 0x30; -pub const QIF_USAGE: ::uint32_t = 0xa; +pub const QIF_ALL: u32 = 0x3f; +pub const QIF_BLIMITS: u32 = 0x1; +pub const QIF_BTIME: u32 = 0x10; +pub const QIF_ILIMITS: u32 = 0x4; +pub const QIF_INODES: u32 = 0x8; +pub const QIF_ITIME: u32 = 0x20; +pub const QIF_LIMITS: u32 = 0x5; +pub const QIF_SPACE: u32 = 0x2; +pub const QIF_TIMES: u32 = 0x30; +pub const QIF_USAGE: u32 = 0xa; pub const SA_NOCLDSTOP: ::c_int = 0x1; pub const SA_NOCLDWAIT: ::c_int = 0x2; pub const SA_NODEFER: ::c_int = 0x40000000; diff --git a/libc/src/unix/uclibc/mips/mod.rs b/libc/src/unix/uclibc/mips/mod.rs index 27f6fe5..fa4b0cb 100644 --- a/libc/src/unix/uclibc/mips/mod.rs +++ b/libc/src/unix/uclibc/mips/mod.rs @@ -391,15 +391,15 @@ pub const MCL_FUTURE: ::c_int = 0x0002; pub const SIGSTKSZ: ::size_t = 8192; pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF1: ::c_int = 0x00008000; -pub const BS1: ::c_int = 0x00002000; -pub const VT1: ::c_int = 0x00004000; +pub const TAB1: ::tcflag_t = 0x00000800; +pub const TAB2: ::tcflag_t = 0x00001000; +pub const TAB3: ::tcflag_t = 0x00001800; +pub const CR1: ::tcflag_t = 0x00000200; +pub const CR2: ::tcflag_t = 0x00000400; +pub const CR3: ::tcflag_t = 0x00000600; +pub const FF1: ::tcflag_t = 0x00008000; +pub const BS1: ::tcflag_t = 0x00002000; +pub const VT1: ::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; diff --git a/libc/src/unix/uclibc/mod.rs b/libc/src/unix/uclibc/mod.rs index e3baba0..568e0bc 100644 --- a/libc/src/unix/uclibc/mod.rs +++ b/libc/src/unix/uclibc/mod.rs @@ -80,13 +80,6 @@ s! { pub ai_next: *mut addrinfo, } - pub struct sockaddr_nl { - pub nl_family: ::sa_family_t, - nl_pad: ::c_ushort, - pub nl_pid: u32, - pub nl_groups: u32 - } - pub struct sockaddr_ll { pub sll_family: ::c_ushort, pub sll_protocol: ::c_ushort, @@ -242,53 +235,45 @@ s! { } pub struct dqblk { - pub dqb_bhardlimit: ::uint32_t, - pub dqb_bsoftlimit: ::uint32_t, - pub dqb_curblocks: ::uint32_t, - pub dqb_ihardlimit: ::uint32_t, - pub dqb_isoftlimit: ::uint32_t, - pub dqb_curinodes: ::uint32_t, + pub dqb_bhardlimit: u32, + pub dqb_bsoftlimit: u32, + pub dqb_curblocks: u32, + pub dqb_ihardlimit: u32, + pub dqb_isoftlimit: u32, + pub dqb_curinodes: u32, pub dqb_btime: ::time_t, pub dqb_itime: ::time_t, } pub struct signalfd_siginfo { - pub ssi_signo: ::uint32_t, - pub ssi_errno: ::int32_t, - pub ssi_code: ::int32_t, - pub ssi_pid: ::uint32_t, - pub ssi_uid: ::uint32_t, - pub ssi_fd: ::int32_t, - pub ssi_tid: ::uint32_t, - pub ssi_band: ::uint32_t, - pub ssi_overrun: ::uint32_t, - pub ssi_trapno: ::uint32_t, - pub ssi_status: ::int32_t, - pub ssi_int: ::int32_t, - pub ssi_ptr: ::uint64_t, - pub ssi_utime: ::uint64_t, - pub ssi_stime: ::uint64_t, - pub ssi_addr: ::uint64_t, - pub ssi_addr_lsb: ::uint16_t, - _pad2: ::uint16_t, - pub ssi_syscall: ::int32_t, - pub ssi_call_addr: ::uint64_t, - pub ssi_arch: ::uint32_t, - _pad: [::uint8_t; 28], + pub ssi_signo: u32, + pub ssi_errno: i32, + pub ssi_code: i32, + pub ssi_pid: u32, + pub ssi_uid: u32, + pub ssi_fd: i32, + pub ssi_tid: u32, + pub ssi_band: u32, + pub ssi_overrun: u32, + pub ssi_trapno: u32, + pub ssi_status: i32, + pub ssi_int: i32, + pub ssi_ptr: u64, + pub ssi_utime: u64, + pub ssi_stime: u64, + pub ssi_addr: u64, + pub ssi_addr_lsb: u16, + _pad2: u16, + pub ssi_syscall: i32, + pub ssi_call_addr: u64, + pub ssi_arch: u32, + _pad: [u8; 28], } pub struct fsid_t { __val: [::c_int; 2], } - 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_long; 4] - } - pub struct cpu_set_t { #[cfg(target_pointer_width = "32")] bits: [u32; 32], @@ -321,8 +306,8 @@ s_no_extra_traits! { )] #[allow(missing_debug_implementations)] pub struct epoll_event { - pub events: ::uint32_t, - pub u64: ::uint64_t, + pub events: u32, + pub u64: u64, } #[allow(missing_debug_implementations)] @@ -368,6 +353,78 @@ s_no_extra_traits! { pub d_type: ::c_uchar, pub d_name: [::c_char; 256], } + + 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_long; 4] + } + + pub struct sockaddr_nl { + pub nl_family: ::sa_family_t, + nl_pad: ::c_ushort, + pub nl_pid: u32, + pub nl_groups: u32 + } +} + +cfg_if! { + if #[cfg(feature = "extra_traits")] { + impl PartialEq for mq_attr { + fn eq(&self, other: &mq_attr) -> bool { + self.mq_flags == other.mq_flags && + self.mq_maxmsg == other.mq_maxmsg && + self.mq_msgsize == other.mq_msgsize && + self.mq_curmsgs == other.mq_curmsgs + } + } + impl Eq for mq_attr {} + impl ::fmt::Debug for mq_attr { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("mq_attr") + .field("mq_flags", &self.mq_flags) + .field("mq_maxmsg", &self.mq_maxmsg) + .field("mq_msgsize", &self.mq_msgsize) + .field("mq_curmsgs", &self.mq_curmsgs) + .finish() + } + } + impl ::hash::Hash for mq_attr { + fn hash<H: ::hash::Hasher>(&self, state: &mut H) { + self.mq_flags.hash(state); + self.mq_maxmsg.hash(state); + self.mq_msgsize.hash(state); + self.mq_curmsgs.hash(state); + } + } + + impl PartialEq for sockaddr_nl { + fn eq(&self, other: &sockaddr_nl) -> bool { + self.nl_family == other.nl_family && + self.nl_pid == other.nl_pid && + self.nl_groups == other.nl_groups + } + } + impl Eq for sockaddr_nl {} + impl ::fmt::Debug for sockaddr_nl { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("sockaddr_nl") + .field("nl_family", &self.nl_family) + .field("nl_pid", &self.nl_pid) + .field("nl_groups", &self.nl_groups) + .finish() + } + } + impl ::hash::Hash for sockaddr_nl { + fn hash<H: ::hash::Hasher>(&self, state: &mut H) { + self.nl_family.hash(state); + self.nl_pid.hash(state); + self.nl_groups.hash(state); + } + } + } } // intentionally not public, only used for fd_set @@ -853,13 +910,13 @@ pub const TCOON: ::c_int = 1; pub const TCIFLUSH: ::c_int = 0; pub const TCOFLUSH: ::c_int = 1; pub const TCIOFLUSH: ::c_int = 2; -pub const NL0: ::c_int = 0x00000000; -pub const NL1: ::c_int = 0x00000100; -pub const TAB0: ::c_int = 0x00000000; -pub const CR0: ::c_int = 0x00000000; -pub const FF0: ::c_int = 0x00000000; -pub const BS0: ::c_int = 0x00000000; -pub const VT0: ::c_int = 0x00000000; +pub const NL0: ::tcflag_t = 0x00000000; +pub const NL1: ::tcflag_t = 0x00000100; +pub const TAB0: ::tcflag_t = 0x00000000; +pub const CR0: ::tcflag_t = 0x00000000; +pub const FF0: ::tcflag_t = 0x00000000; +pub const BS0: ::tcflag_t = 0x00000000; +pub const VT0: ::tcflag_t = 0x00000000; pub const VERASE: usize = 2; pub const VKILL: usize = 3; pub const VINTR: usize = 0; @@ -1388,6 +1445,11 @@ pub const NOSTR: ::nl_item = 0x503; pub const FILENAME_MAX: ::c_uint = 4095; +#[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 = 39; f! { @@ -1487,6 +1549,11 @@ f! { } extern { + #[cfg_attr(target_os = "linux", + link_name = "__xpg_strerror_r")] + pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, + buflen: ::size_t) -> ::c_int; + pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, @@ -1500,6 +1567,8 @@ extern { pub fn srand(seed: ::c_uint); pub fn fdatasync(fd: ::c_int) -> ::c_int; + pub fn gettimeofday(tp: *mut ::timeval, + tz: *mut ::timezone) -> ::c_int; pub fn mincore(addr: *mut ::c_void, len: ::size_t, vec: *mut ::c_uchar) -> ::c_int; pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; @@ -1576,6 +1645,8 @@ extern { pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int; + pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; + pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; pub fn utimensat(dirfd: ::c_int, path: *const ::c_char, times: *const ::timespec, flag: ::c_int) -> ::c_int; |