summaryrefslogtreecommitdiff
path: root/src/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows')
-rw-r--r--src/windows/gnu/align.rs9
-rw-r--r--src/windows/gnu/mod.rs (renamed from src/windows/gnu.rs)7
2 files changed, 16 insertions, 0 deletions
diff --git a/src/windows/gnu/align.rs b/src/windows/gnu/align.rs
new file mode 100644
index 0000000000..dd3a3f72d3
--- /dev/null
+++ b/src/windows/gnu/align.rs
@@ -0,0 +1,9 @@
+cfg_if! {
+ if #[cfg(target_pointer_width = "64")] {
+ #[derive(Copy, Clone, Debug, PartialEq)]
+ #[repr(C, 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]);
+ }
+}
diff --git a/src/windows/gnu.rs b/src/windows/gnu/mod.rs
index d6736d87c2..e74628b981 100644
--- a/src/windows/gnu.rs
+++ b/src/windows/gnu/mod.rs
@@ -14,3 +14,10 @@ extern "C" {
n: ::size_t,
) -> ::c_int;
}
+
+cfg_if! {
+ if #[cfg(libc_align)] {
+ mod align;
+ pub use self::align::*;
+ }
+}