Fix max_align_t

This commit is contained in:
gnzlbg 2019-09-25 19:36:04 +02:00
parent 90269e85ba
commit fe67d7d9f9
21 changed files with 85 additions and 65 deletions

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f64; 2]);
s! {
#[repr(align(16))]
pub struct max_align_t([f64; 2]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f64; 2]);
s! {
#[repr(align(16))]
pub struct max_align_t([f64; 2]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f64; 4]);
s! {
#[repr(align(16))]
pub struct max_align_t([f64; 4]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(8))]
pub struct max_align_t([f64; 2]);
s! {
#[repr(align(8))]
pub struct max_align_t([f64; 2]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f32; 8]);
s! {
#[repr(align(16))]
pub struct max_align_t([f32; 8]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f64; 4]);
s! {
#[repr(align(16))]
pub struct max_align_t([f64; 4]);
}

View File

@ -1,10 +1,9 @@
macro_rules! expand_align {
() => {
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(8))]
pub struct max_align_t([f64; 2]);
s! {
#[repr(align(8))]
pub struct max_align_t([f64; 2]);
#[repr(align(4))]
pub struct pthread_mutex_t {
size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T],

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(8))]
pub struct max_align_t([i64; 2]);
s! {
#[repr(align(8))]
pub struct max_align_t([i64; 2]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(8))]
pub struct max_align_t([f32; 4]);
s! {
#[repr(align(8))]
pub struct max_align_t([f32; 4]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f64; 6]);
s! {
#[repr(align(16))]
pub struct max_align_t([f64; 6]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f32; 8]);
s! {
#[repr(align(16))]
pub struct max_align_t([f32; 8]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f64; 4]);
s! {
#[repr(align(16))]
pub struct max_align_t([f64; 4]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([i64; 4]);
s! {
#[repr(align(16))]
pub struct max_align_t([i64; 4]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([i64; 4]);
s! {
#[repr(align(16))]
pub struct max_align_t([i64; 4]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f64; 4]);
s! {
#[repr(align(16))]
pub struct max_align_t([f64; 4]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(8))]
pub struct max_align_t(i64, i64);
s! {
#[repr(align(8))]
pub struct max_align_t(i64, i64);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(8))]
pub struct max_align_t([f32; 4]);
s! {
#[repr(align(8))]
pub struct max_align_t([f32; 4]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(8))]
pub struct max_align_t([f64; 3]);
s! {
#[repr(align(8))]
pub struct max_align_t([f64; 3]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f32; 8]);
s! {
#[repr(align(16))]
pub struct max_align_t([f32; 8]);
}

View File

@ -1,3 +1,4 @@
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))]
pub struct max_align_t([f64; 4]);
s! {
#[repr(align(16))]
pub struct max_align_t([f64; 4]);
}

View File

@ -1,9 +1,11 @@
cfg_if! {
if #[cfg(target_pointer_width = "64")] {
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))] pub struct max_align_t([f64; 4]);
s! {
#[repr(align(16))] pub struct max_align_t([f64; 4]);
}
} else if #[cfg(target_pointer_width = "32")] {
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(C, align(16))] pub struct max_align_t([i64; 6]);
s! {
#[repr(align(16))] pub struct max_align_t([i64; 6]);
}
}
}