diff --git a/src/base.rs b/src/base.rs index 65d3999..9e66e4f 100644 --- a/src/base.rs +++ b/src/base.rs @@ -13,13 +13,18 @@ use libc; -#[cfg(target_pointer_width = "32")] -pub type boolean_t = i32; -#[cfg(target_pointer_width = "64")] -pub type boolean_t = u32; +#[cfg(any(target_arch = "x86", + target_arch = "arm", + target_arch = "aarch64"))] +pub type boolean_t = libc::c_int; +#[cfg(target_arch = "x86_64")] +pub type boolean_t = libc::c_uint; -// TODO: this is actually a libc::c_float on 32bit +#[cfg(target_pointer_width = "64")] pub type CGFloat = libc::c_double; +#[cfg(not(target_pointer_width = "64"))] +pub type CGFloat = libc::c_float; + pub type CGError = libc::int32_t; pub type CGAffineTransform = ();