Fix signedness of c_char/c_wchar on ARM linux
This commit is contained in:
parent
918f8e17f8
commit
9c99c16a2d
2
src/unix/notbsd/linux/notmips/b32/arm.rs
Normal file
2
src/unix/notbsd/linux/notmips/b32/arm.rs
Normal file
@ -0,0 +1,2 @@
|
||||
pub type c_char = u8;
|
||||
pub type wchar_t = u32;
|
@ -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 {
|
||||
// ...
|
||||
}
|
||||
}
|
2
src/unix/notbsd/linux/notmips/b32/x86.rs
Normal file
2
src/unix/notbsd/linux/notmips/b32/x86.rs
Normal file
@ -0,0 +1,2 @@
|
||||
pub type c_char = i8;
|
||||
pub type wchar_t = i32;
|
Loading…
Reference in New Issue
Block a user