Add align feature to sem_t struct
This commit is contained in:
parent
5f38367da3
commit
41ca29f709
@ -21,11 +21,16 @@ s! {
|
||||
}
|
||||
|
||||
// FIXME this is actually a union
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "32"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
pub struct sem_t {
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
__size: [::c_char; 16],
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
__size: [::c_char; 32],
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_long; 0],
|
||||
}
|
||||
|
||||
|
@ -158,11 +158,16 @@ s! {
|
||||
}
|
||||
|
||||
// FIXME this is actually a union
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "32"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
pub struct sem_t {
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
__size: [::c_char; 16],
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
__size: [::c_char; 32],
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_long; 0],
|
||||
}
|
||||
|
||||
|
@ -245,8 +245,13 @@ s! {
|
||||
}
|
||||
|
||||
// FIXME this is actually a union
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "32"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
pub struct sem_t {
|
||||
__size: [::c_char; 32],
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_long; 0],
|
||||
}
|
||||
|
||||
|
@ -222,11 +222,16 @@ s! {
|
||||
}
|
||||
|
||||
// FIXME this is actually a union
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "32"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
pub struct sem_t {
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
__size: [::c_char; 16],
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
__size: [::c_char; 32],
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_long; 0],
|
||||
}
|
||||
}
|
||||
|
@ -188,8 +188,13 @@ s! {
|
||||
}
|
||||
|
||||
// FIXME this is actually a union
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "32"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
pub struct sem_t {
|
||||
__size: [::c_char; 32],
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_long; 0],
|
||||
}
|
||||
}
|
||||
|
@ -205,11 +205,16 @@ s! {
|
||||
pub c_cc: [::cc_t; ::NCCS],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "32"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
pub struct sem_t { // ToDo
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
__size: [::c_char; 16],
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
__size: [::c_char; 32],
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_long; 0],
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user