diff --git a/src/unix/notbsd/linux/notmips/b32/arm.rs b/src/unix/notbsd/linux/notmips/b32/arm.rs new file mode 100644 index 00000000..1a92e3b4 --- /dev/null +++ b/src/unix/notbsd/linux/notmips/b32/arm.rs @@ -0,0 +1,2 @@ +pub type c_char = u8; +pub type wchar_t = u32; diff --git a/src/unix/notbsd/linux/notmips/b32.rs b/src/unix/notbsd/linux/notmips/b32/mod.rs similarity index 84% rename from src/unix/notbsd/linux/notmips/b32.rs rename to src/unix/notbsd/linux/notmips/b32/mod.rs index 503ce5e7..6928962c 100644 --- a/src/unix/notbsd/linux/notmips/b32.rs +++ b/src/unix/notbsd/linux/notmips/b32/mod.rs @@ -1,6 +1,5 @@ //! 32-bit specific definitions for linux-like values -pub type c_char = i8; pub type c_long = i32; pub type c_ulong = u32; pub type size_t = u32; @@ -8,7 +7,6 @@ pub type ptrdiff_t = i32; pub type clock_t = i32; pub type time_t = i32; pub type suseconds_t = i32; -pub type wchar_t = i32; pub type intptr_t = i32; pub type uintptr_t = u32; pub type ino_t = u32; @@ -47,3 +45,15 @@ s! { __size: [u32; 9] } } + +cfg_if! { + if #[cfg(target_arch = "x86")] { + mod x86; + pub use self::x86::*; + } else if #[cfg(target_arch = "arm")] { + mod arm; + pub use self::arm::*; + } else { + // ... + } +} diff --git a/src/unix/notbsd/linux/notmips/b32/x86.rs b/src/unix/notbsd/linux/notmips/b32/x86.rs new file mode 100644 index 00000000..76ec3ce8 --- /dev/null +++ b/src/unix/notbsd/linux/notmips/b32/x86.rs @@ -0,0 +1,2 @@ +pub type c_char = i8; +pub type wchar_t = i32;