diff --git a/ci/build.sh b/ci/build.sh index b830ceb0..add8ca0c 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -167,11 +167,11 @@ done # FIXME: https://github.com/rust-lang/rust/issues/58564 # sparc-unknown-linux-gnu RUST_LINUX_NO_CORE_TARGETS="\ -x86_64-unknown-hermit \ -x86_64-unknown-dragonfly \ -aarch64-unknown-hermit \ aarch64-pc-windows-msvc \ aarch64-unknown-cloudabi \ +aarch64-unknown-hermit \ +aarch64-unknown-netbsd \ +aarch64-unknown-openbsd \ armebv7r-none-eabi \ armebv7r-none-eabihf \ armv7-unknown-cloudabi-eabihf \ @@ -182,8 +182,12 @@ i686-pc-windows-msvc \ i686-unknown-cloudabi \ i686-unknown-haiku \ i686-unknown-netbsd \ +i686-unknown-openbsd \ +mips-unknown-linux-uclibc \ +mipsel-unknown-linux-uclibc \ nvptx64-nvidia-cuda \ powerpc-unknown-linux-gnuspe \ +powerpc-unknown-netbsd \ riscv32imac-unknown-none-elf \ riscv32imc-unknown-none-elf \ sparc64-unknown-netbsd \ @@ -196,8 +200,12 @@ thumbv7neon-unknown-linux-gnueabihf \ thumbv8m.main-none-eabi \ x86_64-pc-windows-msvc x86_64-unknown-bitrig \ +x86_64-unknown-dragonfly \ +x86_64-unknown-dragonfly \ x86_64-unknown-haiku \ -x86_64-unknown-openbsd +x86_64-unknown-hermit \ +x86_64-unknown-l4re-uclibc \ +x86_64-unknown-openbsd \ " if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then diff --git a/src/unix/uclibc/align.rs b/src/unix/uclibc/align.rs index bcae2e6b..3307c9d1 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", @@ -47,15 +19,48 @@ macro_rules! expand_align { size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], } - #[repr(align(8))] - pub struct pthread_cond_t { - size: [u8; ::__SIZEOF_PTHREAD_COND_T], - } - #[repr(align(4))] pub struct pthread_condattr_t { size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], } } + + s_no_extra_traits! { + #[repr(align(8))] + #[allow(missing_debug_implementations)] + 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/mod.rs b/src/unix/uclibc/mod.rs index d2735dba..eec3fe01 100644 --- a/src/unix/uclibc/mod.rs +++ b/src/unix/uclibc/mod.rs @@ -66,20 +66,6 @@ s! { pub sin6_scope_id: u32, } - pub struct sockaddr_un { - pub sun_family: sa_family_t, - pub sun_path: [::c_char; 108] - } - - pub struct sockaddr_storage { - pub ss_family: sa_family_t, - __ss_align: ::size_t, - #[cfg(target_pointer_width = "32")] - __ss_pad2: [u8; 128 - 2 * 4], - #[cfg(target_pointer_width = "64")] - __ss_pad2: [u8; 128 - 2 * 8], - } - pub struct addrinfo { pub ai_flags: ::c_int, pub ai_family: ::c_int, @@ -140,15 +126,6 @@ s! { pub dli_saddr: *mut ::c_void, } - pub struct utsname { - pub sysname: [::c_char; 65], - pub nodename: [::c_char; 65], - pub release: [::c_char; 65], - pub version: [::c_char; 65], - pub machine: [::c_char; 65], - pub domainname: [::c_char; 65] - } - pub struct lconv { pub decimal_point: *mut ::c_char, pub thousands_sep: *mut ::c_char, @@ -189,22 +166,6 @@ s! { __unused1: [::c_int; 12] } - pub struct dirent { - pub d_ino: ::ino_t, - pub d_off: ::off_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], - } - - pub struct dirent64 { - pub d_ino: ::ino64_t, - pub d_off: ::off64_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], - } - pub struct rlimit64 { pub rlim_cur: rlim64_t, pub rlim_max: rlim64_t, @@ -358,10 +319,55 @@ s_no_extra_traits! { any(target_arch = "x86", target_arch = "x86_64"), repr(packed) )] + #[allow(missing_debug_implementations)] pub struct epoll_event { pub events: ::uint32_t, pub u64: ::uint64_t, } + + #[allow(missing_debug_implementations)] + pub struct sockaddr_un { + pub sun_family: sa_family_t, + pub sun_path: [::c_char; 108] + } + + #[allow(missing_debug_implementations)] + pub struct sockaddr_storage { + pub ss_family: sa_family_t, + __ss_align: ::size_t, + #[cfg(target_pointer_width = "32")] + __ss_pad2: [u8; 128 - 2 * 4], + #[cfg(target_pointer_width = "64")] + __ss_pad2: [u8; 128 - 2 * 8], + } + + #[allow(missing_debug_implementations)] + pub struct utsname { + pub sysname: [::c_char; 65], + pub nodename: [::c_char; 65], + pub release: [::c_char; 65], + pub version: [::c_char; 65], + pub machine: [::c_char; 65], + pub domainname: [::c_char; 65] + } + + #[allow(missing_debug_implementations)] + pub struct dirent { + pub d_ino: ::ino_t, + pub d_off: ::off_t, + pub d_reclen: ::c_ushort, + pub d_type: ::c_uchar, + 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: ::c_ushort, + pub d_type: ::c_uchar, + pub d_name: [::c_char; 256], + } } // intentionally not public, only used for fd_set diff --git a/src/unix/uclibc/x86_64/align.rs b/src/unix/uclibc/x86_64/align.rs index 5a97c19f..8d4bbd59 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 4f5811d1..16ec0ef9 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 0afa7dc7..a8bb0794 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