Fix uclibc l4re
This commit is contained in:
parent
51794419a5
commit
183c51bc88
@ -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],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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],
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user