Fix signedness of c_char/c_wchar on ARM linux

This commit is contained in:
Alex Crichton 2015-09-15 16:40:08 -07:00
parent 918f8e17f8
commit 9c99c16a2d
3 changed files with 16 additions and 2 deletions

View file

@ -0,0 +1,2 @@
pub type c_char = u8;
pub type wchar_t = u32;

View file

@ -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 {
// ...
}
}

View file

@ -0,0 +1,2 @@
pub type c_char = i8;
pub type wchar_t = i32;