diff --git a/src/unix/uclibc/align.rs b/src/unix/uclibc/align.rs index 1e53ff4bc94e6..3307c9d169456 100644 --- a/src/unix/uclibc/align.rs +++ b/src/unix/uclibc/align.rs @@ -1,34 +1,6 @@ macro_rules! expand_align { () => { s! { - #[cfg_attr(all(target_pointer_width = "32", - any(target_arch = "mips", - target_arch = "arm", - target_arch = "powerpc")), - repr(align(4)))] - #[cfg_attr(any(target_pointer_width = "64", - not(any(target_arch = "mips", - target_arch = "arm", - target_arch = "powerpc"))), - repr(align(8)))] - pub struct pthread_mutex_t { - size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], - } - - #[cfg_attr(all(target_pointer_width = "32", - any(target_arch = "mips", - target_arch = "arm", - target_arch = "powerpc")), - repr(align(4)))] - #[cfg_attr(any(target_pointer_width = "64", - not(any(target_arch = "mips", - target_arch = "arm", - target_arch = "powerpc"))), - repr(align(8)))] - pub struct pthread_rwlock_t { - size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], - } - #[cfg_attr(any(target_pointer_width = "32", target_arch = "x86_64", target_arch = "powerpc64", @@ -59,6 +31,36 @@ macro_rules! expand_align { pub struct pthread_cond_t { size: [u8; ::__SIZEOF_PTHREAD_COND_T], } + + #[cfg_attr(all(target_pointer_width = "32", + any(target_arch = "mips", + target_arch = "arm", + target_arch = "powerpc")), + repr(align(4)))] + #[cfg_attr(any(target_pointer_width = "64", + not(any(target_arch = "mips", + target_arch = "arm", + target_arch = "powerpc"))), + repr(align(8)))] + #[allow(missing_debug_implementations)] + pub struct pthread_mutex_t { + size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], + } + + #[cfg_attr(all(target_pointer_width = "32", + any(target_arch = "mips", + target_arch = "arm", + target_arch = "powerpc")), + repr(align(4)))] + #[cfg_attr(any(target_pointer_width = "64", + not(any(target_arch = "mips", + target_arch = "arm", + target_arch = "powerpc"))), + repr(align(8)))] + #[allow(missing_debug_implementations)] + pub struct pthread_rwlock_t { + size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], + } } } } diff --git a/src/unix/uclibc/x86_64/align.rs b/src/unix/uclibc/x86_64/align.rs index 5a97c19fb9fbe..8d4bbd59b093d 100644 --- a/src/unix/uclibc/x86_64/align.rs +++ b/src/unix/uclibc/x86_64/align.rs @@ -12,20 +12,6 @@ macro_rules! expand_align { __size: [::c_char; 32], } - #[cfg_attr(all(target_pointer_width = "32", - any(target_arch = "mips", - target_arch = "arm", - target_arch = "powerpc")), - repr(align(4)))] - #[cfg_attr(all(any(target_pointer_width = "64", - not(any(target_arch = "mips", - target_arch = "arm", - target_arch = "powerpc")))), - repr(align(8)))] - pub struct pthread_mutex_t { // ToDo - size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], - } - #[cfg_attr(any(target_pointer_width = "32", target_arch = "x86_64", target_arch = "powerpc64", @@ -44,15 +30,33 @@ macro_rules! expand_align { size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], } - #[repr(align(8))] - pub struct pthread_cond_t { // ToDo - size: [u8; ::__SIZEOF_PTHREAD_COND_T], - } - #[repr(align(4))] pub struct pthread_condattr_t { // ToDo size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], } + } + + s_no_extra_traits! { + #[cfg_attr(all(target_pointer_width = "32", + any(target_arch = "mips", + target_arch = "arm", + target_arch = "powerpc")), + repr(align(4)))] + #[cfg_attr(all(any(target_pointer_width = "64", + not(any(target_arch = "mips", + target_arch = "arm", + target_arch = "powerpc")))), + repr(align(8)))] + #[allow(missing_debug_implementations)] + pub struct pthread_mutex_t { // ToDo + size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], + } + + #[repr(align(8))] + #[allow(missing_debug_implementations)] + pub struct pthread_cond_t { // ToDo + size: [u8; ::__SIZEOF_PTHREAD_COND_T], + } #[cfg_attr(all(target_pointer_width = "32", any(target_arch = "mips", @@ -64,6 +68,7 @@ macro_rules! expand_align { target_arch = "arm", target_arch = "powerpc"))), repr(align(8)))] + #[allow(missing_debug_implementations)] pub struct pthread_rwlock_t { // ToDo size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], } diff --git a/src/unix/uclibc/x86_64/l4re.rs b/src/unix/uclibc/x86_64/l4re.rs index 4f5811d17dfe8..16ec0ef966473 100644 --- a/src/unix/uclibc/x86_64/l4re.rs +++ b/src/unix/uclibc/x86_64/l4re.rs @@ -27,6 +27,7 @@ s! { } #[cfg(target_os = "l4re")] +#[allow(missing_debug_implementations)] pub struct pthread_attr_t { pub __detachstate: ::c_int, pub __schedpolicy: ::c_int, diff --git a/src/unix/uclibc/x86_64/mod.rs b/src/unix/uclibc/x86_64/mod.rs index 0afa7dc77b6e0..a8bb0794aa1de 100644 --- a/src/unix/uclibc/x86_64/mod.rs +++ b/src/unix/uclibc/x86_64/mod.rs @@ -20,22 +20,6 @@ pub type time_t = ::c_int; pub type wchar_t = ::c_int; s! { - pub struct dirent { - pub d_ino: ::ino64_t, - pub d_off: ::off64_t, - pub d_reclen: u16, - pub d_type: u8, - pub d_name: [::c_char; 256], - } - - pub struct dirent64 { - pub d_ino: ::ino64_t, - pub d_off: ::off64_t, - pub d_reclen: u16, - pub d_type: u8, - pub d_name: [::c_char; 256], - } - pub struct ipc_perm { pub __key: ::key_t, pub uid: ::uid_t, @@ -252,6 +236,25 @@ s! { } } +s_no_extra_traits! { + #[allow(missing_debug_implementations)] + pub struct dirent { + pub d_ino: ::ino64_t, + pub d_off: ::off64_t, + pub d_reclen: u16, + pub d_type: u8, + pub d_name: [::c_char; 256], + } + #[allow(missing_debug_implementations)] + pub struct dirent64 { + pub d_ino: ::ino64_t, + pub d_off: ::off64_t, + pub d_reclen: u16, + pub d_type: u8, + pub d_name: [::c_char; 256], + } +} + // constants pub const EADDRINUSE: ::c_int = 98; // Address already in use pub const EADDRNOTAVAIL: ::c_int = 99; // Cannot assign requested address