Cleanup dox mess
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs
index 670ef56..f24b1dd 100644
--- a/src/unix/bsd/apple/mod.rs
+++ b/src/unix/bsd/apple/mod.rs
@@ -1,8 +1,6 @@
//! Apple (ios/darwin)-specific definitions
//!
//! This covers *-apple-* triples currently
-use dox::mem;
-
pub type c_char = i8;
pub type clock_t = c_ulong;
pub type time_t = c_long;
@@ -36,8 +34,8 @@
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum timezone {}
-impl ::dox::Copy for timezone {}
-impl ::dox::Clone for timezone {
+impl ::Copy for timezone {}
+impl ::Clone for timezone {
fn clone(&self) -> timezone { *self }
}
@@ -2782,12 +2780,12 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
fn __DARWIN_ALIGN32(p: usize) -> usize {
- const __DARWIN_ALIGNBYTES32: usize = mem::size_of::<u32>() - 1;
+ const __DARWIN_ALIGNBYTES32: usize = ::mem::size_of::<u32>() - 1;
p + __DARWIN_ALIGNBYTES32 & !__DARWIN_ALIGNBYTES32
}
} else {
fn __DARWIN_ALIGN32(p: usize) -> usize {
- let __DARWIN_ALIGNBYTES32: usize = mem::size_of::<u32>() - 1;
+ let __DARWIN_ALIGNBYTES32: usize = ::mem::size_of::<u32>() - 1;
p + __DARWIN_ALIGNBYTES32 & !__DARWIN_ALIGNBYTES32
}
}
@@ -2803,7 +2801,7 @@
let next = cmsg as usize + __DARWIN_ALIGN32(cmsg_len as usize);
let max = (*mhdr).msg_control as usize
+ (*mhdr).msg_controllen as usize;
- if next + __DARWIN_ALIGN32(mem::size_of::<::cmsghdr>()) > max {
+ if next + __DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) > max {
0 as *mut ::cmsghdr
} else {
next as *mut ::cmsghdr
@@ -2812,17 +2810,17 @@
pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar {
(cmsg as *mut ::c_uchar)
- .offset(__DARWIN_ALIGN32(mem::size_of::<::cmsghdr>()) as isize)
+ .offset(__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) as isize)
}
pub fn CMSG_SPACE(length: ::c_uint) -> ::c_uint {
- (__DARWIN_ALIGN32(mem::size_of::<::cmsghdr>())
+ (__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>())
+ __DARWIN_ALIGN32(length as usize))
as ::c_uint
}
pub fn CMSG_LEN(length: ::c_uint) -> ::c_uint {
- (__DARWIN_ALIGN32(mem::size_of::<::cmsghdr>()) + length as usize)
+ (__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) + length as usize)
as ::c_uint
}
diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs
index 5656a26..c4fc528 100644
--- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs
+++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -20,13 +20,12 @@
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum sem {}
-impl ::dox::Copy for sem {}
-impl ::dox::Clone for sem {
+impl ::Copy for sem {}
+impl ::Clone for sem {
fn clone(&self) -> sem { *self }
}
s! {
-
pub struct exit_status {
pub e_termination: u16,
pub e_exit: u16
@@ -801,18 +800,18 @@
f! {
pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar {
(cmsg as *mut ::c_uchar)
- .offset(_CMSG_ALIGN(mem::size_of::<::cmsghdr>()) as isize)
+ .offset(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as isize)
}
pub fn CMSG_LEN(length: ::c_uint) -> ::c_uint {
- _CMSG_ALIGN(mem::size_of::<::cmsghdr>()) + length as usize
+ _CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) + length as usize
}
pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr)
-> *mut ::cmsghdr
{
let next = cmsg as usize + _CMSG_ALIGN((*cmsg).cmsg_len)
- + _CMSG_ALIGN(mem::size_of::<::cmsghdr>());
+ + _CMSG_ALIGN(::mem::size_of::<::cmsghdr>());
let max = (*mhdr).msg_control as usize
+ (*mhdr).msg_controllen as usize;
if next <= max {
@@ -823,7 +822,8 @@
}
pub fn CMSG_SPACE(length: ::c_uint) -> ::c_uint {
- _CMSG_ALIGN(mem::size_of::<::cmsghdr>()) + _CMSG_ALIGN(length as usize)
+ _CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) +
+ _CMSG_ALIGN(length as usize)
}
}
diff --git a/src/unix/bsd/freebsdlike/freebsd/aarch64.rs b/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
index dac614f..996abc5 100644
--- a/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
pub type c_char = u8;
pub type c_long = i64;
pub type c_ulong = u64;
@@ -36,7 +34,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_longlong>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 8 - 1;
diff --git a/src/unix/bsd/freebsdlike/freebsd/arm.rs b/src/unix/bsd/freebsdlike/freebsd/arm.rs
index 99a761e..945aca9 100644
--- a/src/unix/bsd/freebsdlike/freebsd/arm.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/arm.rs
@@ -38,7 +38,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_int>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 4 - 1;
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index 0d0eb3f..573c096 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
pub type fflags_t = u32;
pub type clock_t = i32;
pub type ino_t = u32;
@@ -983,11 +981,11 @@
f! {
pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar {
(cmsg as *mut ::c_uchar)
- .offset(_ALIGN(mem::size_of::<::cmsghdr>()) as isize)
+ .offset(_ALIGN(::mem::size_of::<::cmsghdr>()) as isize)
}
pub fn CMSG_LEN(length: ::c_uint) -> ::c_uint {
- _ALIGN(mem::size_of::<::cmsghdr>()) as ::c_uint + length
+ _ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length
}
pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr)
@@ -997,7 +995,7 @@
return ::CMSG_FIRSTHDR(mhdr);
};
let next = cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)
- + _ALIGN(mem::size_of::<::cmsghdr>());
+ + _ALIGN(::mem::size_of::<::cmsghdr>());
let max = (*mhdr).msg_control as usize
+ (*mhdr).msg_controllen as usize;
if next > max {
@@ -1009,7 +1007,7 @@
}
pub fn CMSG_SPACE(length: ::c_uint) -> ::c_uint {
- (_ALIGN(mem::size_of::<::cmsghdr>()) + _ALIGN(length as usize))
+ (_ALIGN(::mem::size_of::<::cmsghdr>()) + _ALIGN(length as usize))
as ::c_uint
}
diff --git a/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs b/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs
index 517f296..9d893b6 100644
--- a/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs
@@ -34,7 +34,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_long>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 8 - 1;
diff --git a/src/unix/bsd/freebsdlike/freebsd/x86.rs b/src/unix/bsd/freebsdlike/freebsd/x86.rs
index b31e335..845124d 100644
--- a/src/unix/bsd/freebsdlike/freebsd/x86.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/x86.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
pub type c_char = i8;
pub type c_long = i32;
pub type c_ulong = u32;
@@ -37,7 +35,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_long>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 8 - 1;
diff --git a/src/unix/bsd/freebsdlike/freebsd/x86_64.rs b/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
index 89819fd..323d1ab 100644
--- a/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
pub type c_char = i8;
pub type c_long = i64;
pub type c_ulong = u64;
@@ -36,7 +34,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_long>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 8 - 1;
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs
index ca9ed98..8eb3b0e 100644
--- a/src/unix/bsd/freebsdlike/mod.rs
+++ b/src/unix/bsd/freebsdlike/mod.rs
@@ -17,8 +17,8 @@
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum timezone {}
-impl ::dox::Copy for timezone {}
-impl ::dox::Clone for timezone {
+impl ::Copy for timezone {}
+impl ::Clone for timezone {
fn clone(&self) -> timezone { *self }
}
diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs
index 8b5ec8c..8698d38 100644
--- a/src/unix/bsd/mod.rs
+++ b/src/unix/bsd/mod.rs
@@ -1,5 +1,3 @@
-use dox::{mem, Option};
-
pub type wchar_t = i32;
pub type off_t = i64;
pub type useconds_t = u32;
@@ -435,7 +433,7 @@
f! {
pub fn CMSG_FIRSTHDR(mhdr: *const ::msghdr) -> *mut ::cmsghdr {
- if (*mhdr).msg_controllen as usize >= mem::size_of::<::cmsghdr>() {
+ if (*mhdr).msg_controllen as usize >= ::mem::size_of::<::cmsghdr>() {
(*mhdr).msg_control as *mut ::cmsghdr
} else {
0 as *mut ::cmsghdr
@@ -443,20 +441,20 @@
}
pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
- let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+ let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8;
let fd = fd as usize;
(*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
return
}
pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
- let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+ let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8;
let fd = fd as usize;
return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0
}
pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
- let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
+ let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8;
let fd = fd as usize;
(*set).fds_bits[fd / bits] |= 1 << (fd % bits);
return
@@ -527,7 +525,7 @@
#[cfg_attr(target_os = "freebsd", link_name = "glob@FBSD_1.0")]
pub fn glob(pattern: *const ::c_char,
flags: ::c_int,
- errfunc: Option<extern fn(epath: *const ::c_char,
+ errfunc: ::Option<extern fn(epath: *const ::c_char,
errno: ::c_int) -> ::c_int>,
pglob: *mut ::glob_t) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__globfree30")]
@@ -645,9 +643,9 @@
#[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
pub fn sigwait(set: *const sigset_t,
sig: *mut ::c_int) -> ::c_int;
- pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
- parent: Option<unsafe extern fn()>,
- child: Option<unsafe extern fn()>) -> ::c_int;
+ pub fn pthread_atfork(prepare: ::Option<unsafe extern fn()>,
+ parent: ::Option<unsafe extern fn()>,
+ child: ::Option<unsafe extern fn()>) -> ::c_int;
pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
link_name = "popen$UNIX2003")]
diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs
index d035296..7ba1993 100644
--- a/src/unix/bsd/netbsdlike/mod.rs
+++ b/src/unix/bsd/netbsdlike/mod.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
pub type time_t = i64;
pub type mode_t = u32;
pub type nlink_t = ::uint32_t;
@@ -15,14 +13,14 @@
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum timezone {}
-impl ::dox::Copy for timezone {}
-impl ::dox::Clone for timezone {
+impl ::Copy for timezone {}
+impl ::Clone for timezone {
fn clone(&self) -> timezone { *self }
}
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum sem {}
-impl ::dox::Copy for sem {}
-impl ::dox::Clone for sem {
+impl ::Copy for sem {}
+impl ::Clone for sem {
fn clone(&self) -> sem { *self }
}
@@ -604,11 +602,11 @@
f! {
pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar {
(cmsg as *mut ::c_uchar)
- .offset(_ALIGN(mem::size_of::<::cmsghdr>()) as isize)
+ .offset(_ALIGN(::mem::size_of::<::cmsghdr>()) as isize)
}
pub fn CMSG_LEN(length: ::c_uint) -> ::c_uint {
- _ALIGN(mem::size_of::<::cmsghdr>()) as ::c_uint + length
+ _ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length
}
pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr)
@@ -618,7 +616,7 @@
return ::CMSG_FIRSTHDR(mhdr);
};
let next = cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)
- + _ALIGN(mem::size_of::<::cmsghdr>());
+ + _ALIGN(::mem::size_of::<::cmsghdr>());
let max = (*mhdr).msg_control as usize
+ (*mhdr).msg_controllen as usize;
if next > max {
@@ -630,7 +628,7 @@
}
pub fn CMSG_SPACE(length: ::c_uint) -> ::c_uint {
- (_ALIGN(mem::size_of::<::cmsghdr>()) + _ALIGN(length as usize))
+ (_ALIGN(::mem::size_of::<::cmsghdr>()) + _ALIGN(length as usize))
as ::c_uint
}
diff --git a/src/unix/bsd/netbsdlike/netbsd/aarch64.rs b/src/unix/bsd/netbsdlike/netbsd/aarch64.rs
index e30d731..58c4cf7 100644
--- a/src/unix/bsd/netbsdlike/netbsd/aarch64.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/aarch64.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
use PT_FIRSTMACH;
pub type c_long = i64;
@@ -11,7 +9,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_int>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 4 - 1;
diff --git a/src/unix/bsd/netbsdlike/netbsd/arm.rs b/src/unix/bsd/netbsdlike/netbsd/arm.rs
index cfcc139..4bf3ccd 100644
--- a/src/unix/bsd/netbsdlike/netbsd/arm.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/arm.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
use PT_FIRSTMACH;
pub type c_long = i32;
@@ -11,7 +9,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_longlong>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 8 - 1;
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index 36a5366..4517244 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
pub type clock_t = ::c_uint;
pub type suseconds_t = ::c_int;
pub type dev_t = u64;
@@ -1075,7 +1073,7 @@
} else {
0
};
- mem::size_of::<sockcred>() + mem::size_of::<::gid_t>() * ngrps
+ ::mem::size_of::<sockcred>() + ::mem::size_of::<::gid_t>() * ngrps
}
}
diff --git a/src/unix/bsd/netbsdlike/netbsd/powerpc.rs b/src/unix/bsd/netbsdlike/netbsd/powerpc.rs
index 10cdc73..e12fd5e 100644
--- a/src/unix/bsd/netbsdlike/netbsd/powerpc.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/powerpc.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
use PT_FIRSTMACH;
pub type c_long = i32;
@@ -11,7 +9,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_double>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_double>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 8 - 1;
diff --git a/src/unix/bsd/netbsdlike/netbsd/x86.rs b/src/unix/bsd/netbsdlike/netbsd/x86.rs
index 895e7f8..daa89a1 100644
--- a/src/unix/bsd/netbsdlike/netbsd/x86.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/x86.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
pub type c_long = i32;
pub type c_ulong = u32;
pub type c_char = i8;
@@ -9,7 +7,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_int>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 4 - 1;
diff --git a/src/unix/bsd/netbsdlike/netbsd/x86_64.rs b/src/unix/bsd/netbsdlike/netbsd/x86_64.rs
index e71a82c..0860d4f 100644
--- a/src/unix/bsd/netbsdlike/netbsd/x86_64.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/x86_64.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
use PT_FIRSTMACH;
pub type c_long = i64;
@@ -11,7 +9,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_long>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 8 - 1;
diff --git a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
index cf67747..a003a0d 100644
--- a/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
@@ -223,184 +223,183 @@
}
}
-#[cfg(feature = "extra_traits")]
-impl PartialEq for dirent {
- fn eq(&self, other: &dirent) -> bool {
- self.d_fileno == other.d_fileno
- && self.d_off == other.d_off
- && self.d_reclen == other.d_reclen
- && self.d_type == other.d_type
- && self.d_namlen == other.d_namlen
- && self
- .d_name
- .iter()
- .zip(other.d_name.iter())
- .all(|(a,b)| a == b)
- }
-}
-#[cfg(feature = "extra_traits")]
-impl Eq for dirent {}
-#[cfg(feature = "extra_traits")]
-impl std::fmt::Debug for dirent {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
- f.debug_struct("dirent")
- .field("d_fileno", &self.d_fileno)
- .field("d_off", &self.d_off)
- .field("d_reclen", &self.d_reclen)
- .field("d_type", &self.d_type)
- .field("d_namlen", &self.d_namlen)
- // FIXME: .field("d_name", &self.d_name)
- .finish()
- }
-}
-#[cfg(feature = "extra_traits")]
-impl std::hash::Hash for dirent {
- fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
- self.d_fileno.hash(state);
- self.d_off.hash(state);
- self.d_reclen.hash(state);
- self.d_type.hash(state);
- self.d_namlen.hash(state);
- self.d_name.hash(state);
- }
-}
+cfg_if! {
+ if #[cfg(feature = "extra_traits")] {
+ impl PartialEq for dirent {
+ fn eq(&self, other: &dirent) -> bool {
+ self.d_fileno == other.d_fileno
+ && self.d_off == other.d_off
+ && self.d_reclen == other.d_reclen
+ && self.d_type == other.d_type
+ && self.d_namlen == other.d_namlen
+ && self
+ .d_name
+ .iter()
+ .zip(other.d_name.iter())
+ .all(|(a,b)| a == b)
+ }
+ }
-#[cfg(feature = "extra_traits")]
-impl PartialEq for sockaddr_storage {
- fn eq(&self, other: &sockaddr_storage) -> bool {
- self.ss_len == other.ss_len
- && self.ss_family == other.ss_family
- }
-}
-#[cfg(feature = "extra_traits")]
-impl Eq for sockaddr_storage {}
-#[cfg(feature = "extra_traits")]
-impl std::fmt::Debug for sockaddr_storage {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
- f.debug_struct("sockaddr_storage")
- .field("ss_len", &self.ss_len)
- .field("ss_family", &self.ss_family)
- .finish()
- }
-}
-#[cfg(feature = "extra_traits")]
-impl std::hash::Hash for sockaddr_storage {
- fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
- self.ss_len.hash(state);
- self.ss_family.hash(state);
- }
-}
+ impl Eq for dirent {}
-#[cfg(feature = "extra_traits")]
-impl PartialEq for siginfo_t {
- fn eq(&self, other: &siginfo_t) -> bool {
- self.si_signo == other.si_signo
- && self.si_code == other.si_code
- && self.si_errno == other.si_errno
- && self.si_addr == other.si_addr
- }
-}
-#[cfg(feature = "extra_traits")]
-impl Eq for siginfo_t {}
-#[cfg(feature = "extra_traits")]
-impl std::fmt::Debug for siginfo_t {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
- f.debug_struct("siginfo_t")
- .field("si_signo", &self.si_signo)
- .field("si_code", &self.si_code)
- .field("si_errno", &self.si_errno)
- .field("si_addr", &self.si_addr)
- .finish()
- }
-}
-#[cfg(feature = "extra_traits")]
-impl std::hash::Hash for siginfo_t {
- fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
- self.si_signo.hash(state);
- self.si_code.hash(state);
- self.si_errno.hash(state);
- self.si_addr.hash(state);
- }
-}
+ impl std::fmt::Debug for dirent {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ f.debug_struct("dirent")
+ .field("d_fileno", &self.d_fileno)
+ .field("d_off", &self.d_off)
+ .field("d_reclen", &self.d_reclen)
+ .field("d_type", &self.d_type)
+ .field("d_namlen", &self.d_namlen)
+ // FIXME: .field("d_name", &self.d_name)
+ .finish()
+ }
+ }
-#[cfg(feature = "extra_traits")]
-impl PartialEq for lastlog {
- fn eq(&self, other: &lastlog) -> bool {
- self.ll_time == other.ll_time
- && self
- .ll_line
- .iter()
- .zip(other.ll_line.iter())
- .all(|(a,b)| a == b)
- && self
- .ll_host
- .iter()
- .zip(other.ll_host.iter())
- .all(|(a,b)| a == b)
- }
-}
-#[cfg(feature = "extra_traits")]
-impl Eq for lastlog {}
-#[cfg(feature = "extra_traits")]
-impl std::fmt::Debug for lastlog {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
- f.debug_struct("lastlog")
- .field("ll_time", &self.ll_time)
- // FIXME: .field("ll_line", &self.ll_line)
- // FIXME: .field("ll_host", &self.ll_host)
- .finish()
- }
-}
-#[cfg(feature = "extra_traits")]
-impl std::hash::Hash for lastlog {
- fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
- self.ll_time.hash(state);
- self.ll_line.hash(state);
- self.ll_host.hash(state);
- }
-}
+ impl std::hash::Hash for dirent {
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+ self.d_fileno.hash(state);
+ self.d_off.hash(state);
+ self.d_reclen.hash(state);
+ self.d_type.hash(state);
+ self.d_namlen.hash(state);
+ self.d_name.hash(state);
+ }
+ }
-#[cfg(feature = "extra_traits")]
-impl PartialEq for utmp {
- fn eq(&self, other: &utmp) -> bool {
- self.ut_time == other.ut_time
- && self
- .ut_line
- .iter()
- .zip(other.ut_line.iter())
- .all(|(a,b)| a == b)
- && self
- .ut_name
- .iter()
- .zip(other.ut_name.iter())
- .all(|(a,b)| a == b)
- && self
- .ut_host
- .iter()
- .zip(other.ut_host.iter())
- .all(|(a,b)| a == b)
- }
-}
-#[cfg(feature = "extra_traits")]
-impl Eq for utmp {}
-#[cfg(feature = "extra_traits")]
-impl std::fmt::Debug for utmp {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
- f.debug_struct("utmp")
- // FIXME: .field("ut_line", &self.ut_line)
- // FIXME: .field("ut_name", &self.ut_name)
- // FIXME: .field("ut_host", &self.ut_host)
- .field("ut_time", &self.ut_time)
- .finish()
- }
-}
-#[cfg(feature = "extra_traits")]
-impl std::hash::Hash for utmp {
- fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
- self.ut_line.hash(state);
- self.ut_name.hash(state);
- self.ut_host.hash(state);
- self.ut_time.hash(state);
+ impl PartialEq for sockaddr_storage {
+ fn eq(&self, other: &sockaddr_storage) -> bool {
+ self.ss_len == other.ss_len
+ && self.ss_family == other.ss_family
+ }
+ }
+
+ impl Eq for sockaddr_storage {}
+
+ impl std::fmt::Debug for sockaddr_storage {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ f.debug_struct("sockaddr_storage")
+ .field("ss_len", &self.ss_len)
+ .field("ss_family", &self.ss_family)
+ .finish()
+ }
+ }
+
+ impl std::hash::Hash for sockaddr_storage {
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+ self.ss_len.hash(state);
+ self.ss_family.hash(state);
+ }
+ }
+
+ impl PartialEq for siginfo_t {
+ fn eq(&self, other: &siginfo_t) -> bool {
+ self.si_signo == other.si_signo
+ && self.si_code == other.si_code
+ && self.si_errno == other.si_errno
+ && self.si_addr == other.si_addr
+ }
+ }
+
+ impl Eq for siginfo_t {}
+
+ impl std::fmt::Debug for siginfo_t {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ f.debug_struct("siginfo_t")
+ .field("si_signo", &self.si_signo)
+ .field("si_code", &self.si_code)
+ .field("si_errno", &self.si_errno)
+ .field("si_addr", &self.si_addr)
+ .finish()
+ }
+ }
+
+ impl std::hash::Hash for siginfo_t {
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+ self.si_signo.hash(state);
+ self.si_code.hash(state);
+ self.si_errno.hash(state);
+ self.si_addr.hash(state);
+ }
+ }
+
+ impl PartialEq for lastlog {
+ fn eq(&self, other: &lastlog) -> bool {
+ self.ll_time == other.ll_time
+ && self
+ .ll_line
+ .iter()
+ .zip(other.ll_line.iter())
+ .all(|(a,b)| a == b)
+ && self
+ .ll_host
+ .iter()
+ .zip(other.ll_host.iter())
+ .all(|(a,b)| a == b)
+ }
+ }
+
+ impl Eq for lastlog {}
+
+ impl std::fmt::Debug for lastlog {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ f.debug_struct("lastlog")
+ .field("ll_time", &self.ll_time)
+ // FIXME: .field("ll_line", &self.ll_line)
+ // FIXME: .field("ll_host", &self.ll_host)
+ .finish()
+ }
+ }
+
+ impl std::hash::Hash for lastlog {
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+ self.ll_time.hash(state);
+ self.ll_line.hash(state);
+ self.ll_host.hash(state);
+ }
+ }
+
+ impl PartialEq for utmp {
+ fn eq(&self, other: &utmp) -> bool {
+ self.ut_time == other.ut_time
+ && self
+ .ut_line
+ .iter()
+ .zip(other.ut_line.iter())
+ .all(|(a,b)| a == b)
+ && self
+ .ut_name
+ .iter()
+ .zip(other.ut_name.iter())
+ .all(|(a,b)| a == b)
+ && self
+ .ut_host
+ .iter()
+ .zip(other.ut_host.iter())
+ .all(|(a,b)| a == b)
+ }
+ }
+
+ impl Eq for utmp {}
+
+ impl std::fmt::Debug for utmp {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ f.debug_struct("utmp")
+ // FIXME: .field("ut_line", &self.ut_line)
+ // FIXME: .field("ut_name", &self.ut_name)
+ // FIXME: .field("ut_host", &self.ut_host)
+ .field("ut_time", &self.ut_time)
+ .finish()
+ }
+ }
+
+ impl std::hash::Hash for utmp {
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+ self.ut_line.hash(state);
+ self.ut_name.hash(state);
+ self.ut_host.hash(state);
+ self.ut_time.hash(state);
+ }
+ }
}
}
diff --git a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs
index 268e5af..6a8cbb5 100644
--- a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs
+++ b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
pub type c_long = i64;
pub type c_ulong = u64;
pub type c_char = u8;
@@ -8,7 +6,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_long>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 8 - 1;
diff --git a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs
index 661f1f4..5c9eea1 100644
--- a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/mod.rs
@@ -142,31 +142,34 @@
}
}
-#[cfg(feature = "extra_traits")]
-impl PartialEq for mount_info {
- fn eq(&self, other: &mount_info) -> bool {
- unsafe {
- self.align
- .iter()
- .zip(other.align.iter())
- .all(|(a,b)| a == b)
+cfg_if! {
+ if #[cfg(feature = "extra_traits")] {
+ impl PartialEq for mount_info {
+ fn eq(&self, other: &mount_info) -> bool {
+ unsafe {
+ self.align
+ .iter()
+ .zip(other.align.iter())
+ .all(|(a,b)| a == b)
+ }
+ }
}
- }
-}
-#[cfg(feature = "extra_traits")]
-impl Eq for mount_info { }
-#[cfg(feature = "extra_traits")]
-impl std::fmt::Debug for mount_info {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
- f.debug_struct("mount_info")
- // FIXME: .field("align", &self.align)
- .finish()
- }
-}
-#[cfg(feature = "extra_traits")]
-impl std::hash::Hash for mount_info {
- fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
- unsafe { self.align.hash(state) };
+
+ impl Eq for mount_info { }
+
+ impl std::fmt::Debug for mount_info {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ f.debug_struct("mount_info")
+ // FIXME: .field("align", &self.align)
+ .finish()
+ }
+ }
+
+ impl std::hash::Hash for mount_info {
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+ unsafe { self.align.hash(state) };
+ }
+ }
}
}
@@ -200,105 +203,108 @@
}
}
- #[cfg(feature = "extra_traits")]
- impl PartialEq for statfs {
- fn eq(&self, other: &statfs) -> bool {
- self.f_flags == other.f_flags
- && self.f_bsize == other.f_bsize
- && self.f_iosize == other.f_iosize
- && self.f_blocks == other.f_blocks
- && self.f_bfree == other.f_bfree
- && self.f_bavail == other.f_bavail
- && self.f_files == other.f_files
- && self.f_ffree == other.f_ffree
- && self.f_favail == other.f_favail
- && self.f_syncwrites == other.f_syncwrites
- && self.f_syncreads == other.f_syncreads
- && self.f_asyncwrites == other.f_asyncwrites
- && self.f_asyncreads == other.f_asyncreads
- && self.f_fsid == other.f_fsid
- && self.f_namemax == other.f_namemax
- && self.f_owner == other.f_owner
- && self.f_ctime == other.f_ctime
- && self.f_fstypename
- .iter()
- .zip(other.f_fstypename.iter())
- .all(|(a,b)| a == b)
- && self.f_mntonname
- .iter()
- .zip(other.f_mntonname.iter())
- .all(|(a,b)| a == b)
- && self.f_mntfromname
- .iter()
- .zip(other.f_mntfromname.iter())
- .all(|(a,b)| a == b)
- && self.f_mntfromspec
- .iter()
- .zip(other.f_mntfromspec.iter())
- .all(|(a,b)| a == b)
- && self.mount_info == other.mount_info
- }
- }
- #[cfg(feature = "extra_traits")]
- impl Eq for statfs { }
- #[cfg(feature = "extra_traits")]
- impl std::fmt::Debug for statfs {
- fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
- f.debug_struct("statfs")
- .field("f_flags", &self.f_flags)
- .field("f_bsize", &self.f_bsize)
- .field("f_iosize", &self.f_iosize)
- .field("f_blocks", &self.f_blocks)
- .field("f_bfree", &self.f_bfree)
- .field("f_bavail", &self.f_bavail)
- .field("f_files", &self.f_files)
- .field("f_ffree", &self.f_ffree)
- .field("f_favail", &self.f_favail)
- .field("f_syncwrites", &self.f_syncwrites)
- .field("f_syncreads", &self.f_syncreads)
- .field("f_asyncwrites", &self.f_asyncwrites)
- .field("f_asyncreads", &self.f_asyncreads)
- .field("f_fsid", &self.f_fsid)
- .field("f_namemax", &self.f_namemax)
- .field("f_owner", &self.f_owner)
- .field("f_ctime", &self.f_ctime)
- // FIXME: .field("f_fstypename", &self.f_fstypename)
- // FIXME: .field("f_mntonname", &self.f_mntonname)
- // FIXME: .field("f_mntfromname", &self.f_mntfromname)
- // FIXME: .field("f_mntfromspec", &self.f_mntfromspec)
- .field("mount_info", &self.mount_info)
- .finish()
- }
- }
- #[cfg(feature = "extra_traits")]
- impl std::hash::Hash for statfs {
- fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
- self.f_flags.hash(state);
- self.f_bsize.hash(state);
- self.f_iosize.hash(state);
- self.f_blocks.hash(state);
- self.f_bfree.hash(state);
- self.f_bavail.hash(state);
- self.f_files.hash(state);
- self.f_ffree.hash(state);
- self.f_favail.hash(state);
- self.f_syncwrites.hash(state);
- self.f_syncreads.hash(state);
- self.f_asyncwrites.hash(state);
- self.f_asyncreads.hash(state);
- self.f_fsid.hash(state);
- self.f_namemax.hash(state);
- self.f_owner.hash(state);
- self.f_ctime.hash(state);
- self.f_fstypename.hash(state);
- self.f_mntonname.hash(state);
- self.f_mntfromname.hash(state);
- self.f_mntfromspec.hash(state);
- self.mount_info.hash(state);
+ cfg_if! {
+ if #[cfg(feature = "extra_traits")] {
+ impl PartialEq for statfs {
+ fn eq(&self, other: &statfs) -> bool {
+ self.f_flags == other.f_flags
+ && self.f_bsize == other.f_bsize
+ && self.f_iosize == other.f_iosize
+ && self.f_blocks == other.f_blocks
+ && self.f_bfree == other.f_bfree
+ && self.f_bavail == other.f_bavail
+ && self.f_files == other.f_files
+ && self.f_ffree == other.f_ffree
+ && self.f_favail == other.f_favail
+ && self.f_syncwrites == other.f_syncwrites
+ && self.f_syncreads == other.f_syncreads
+ && self.f_asyncwrites == other.f_asyncwrites
+ && self.f_asyncreads == other.f_asyncreads
+ && self.f_fsid == other.f_fsid
+ && self.f_namemax == other.f_namemax
+ && self.f_owner == other.f_owner
+ && self.f_ctime == other.f_ctime
+ && self.f_fstypename
+ .iter()
+ .zip(other.f_fstypename.iter())
+ .all(|(a,b)| a == b)
+ && self.f_mntonname
+ .iter()
+ .zip(other.f_mntonname.iter())
+ .all(|(a,b)| a == b)
+ && self.f_mntfromname
+ .iter()
+ .zip(other.f_mntfromname.iter())
+ .all(|(a,b)| a == b)
+ && self.f_mntfromspec
+ .iter()
+ .zip(other.f_mntfromspec.iter())
+ .all(|(a,b)| a == b)
+ && self.mount_info == other.mount_info
+ }
+ }
+
+ impl Eq for statfs { }
+
+ impl std::fmt::Debug for statfs {
+ fn fmt(&self, f: &mut std::fmt::Formatter)
+ -> std::fmt::Result {
+ f.debug_struct("statfs")
+ .field("f_flags", &self.f_flags)
+ .field("f_bsize", &self.f_bsize)
+ .field("f_iosize", &self.f_iosize)
+ .field("f_blocks", &self.f_blocks)
+ .field("f_bfree", &self.f_bfree)
+ .field("f_bavail", &self.f_bavail)
+ .field("f_files", &self.f_files)
+ .field("f_ffree", &self.f_ffree)
+ .field("f_favail", &self.f_favail)
+ .field("f_syncwrites", &self.f_syncwrites)
+ .field("f_syncreads", &self.f_syncreads)
+ .field("f_asyncwrites", &self.f_asyncwrites)
+ .field("f_asyncreads", &self.f_asyncreads)
+ .field("f_fsid", &self.f_fsid)
+ .field("f_namemax", &self.f_namemax)
+ .field("f_owner", &self.f_owner)
+ .field("f_ctime", &self.f_ctime)
+ // FIXME: .field("f_fstypename", &self.f_fstypename)
+ // FIXME: .field("f_mntonname", &self.f_mntonname)
+ // FIXME: .field("f_mntfromname", &self.f_mntfromname)
+ // FIXME: .field("f_mntfromspec", &self.f_mntfromspec)
+ .field("mount_info", &self.mount_info)
+ .finish()
+ }
+ }
+
+ impl std::hash::Hash for statfs {
+ fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+ self.f_flags.hash(state);
+ self.f_bsize.hash(state);
+ self.f_iosize.hash(state);
+ self.f_blocks.hash(state);
+ self.f_bfree.hash(state);
+ self.f_bavail.hash(state);
+ self.f_files.hash(state);
+ self.f_ffree.hash(state);
+ self.f_favail.hash(state);
+ self.f_syncwrites.hash(state);
+ self.f_syncreads.hash(state);
+ self.f_asyncwrites.hash(state);
+ self.f_asyncreads.hash(state);
+ self.f_fsid.hash(state);
+ self.f_namemax.hash(state);
+ self.f_owner.hash(state);
+ self.f_ctime.hash(state);
+ self.f_fstypename.hash(state);
+ self.f_mntonname.hash(state);
+ self.f_mntfromname.hash(state);
+ self.f_mntfromspec.hash(state);
+ self.mount_info.hash(state);
+ }
+ }
}
}
}
-}
//https://github.com/openbsd/src/blob/master/sys/sys/mount.h
pub const ISOFSMNT_NORRIP: ::c_int = 0x1; // disable Rock Ridge Ext
diff --git a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs
index 959c87b..05538cd 100644
--- a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs
+++ b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
pub type c_long = i32;
pub type c_ulong = u32;
pub type c_char = i8;
@@ -8,7 +6,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_int>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 4 - 1;
diff --git a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs
index b2025a8..7daa9d8 100644
--- a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs
+++ b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs
@@ -1,5 +1,3 @@
-use dox::mem;
-
use PT_FIRSTMACH;
pub type c_long = i64;
@@ -10,7 +8,7 @@
cfg_if! {
if #[cfg(libc_const_size_of)] {
#[doc(hidden)]
- pub const _ALIGNBYTES: usize = mem::size_of::<::c_long>() - 1;
+ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
} else {
#[doc(hidden)]
pub const _ALIGNBYTES: usize = 8 - 1;