Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetBSD: correct c_char signedness on arm and powerpc #1057

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub type c_long = i32;
pub type c_ulong = u32;
pub type c_char = u8;
23 changes: 20 additions & 3 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use dox::mem;

pub type c_char = i8;
pub type clock_t = ::c_uint;
pub type suseconds_t = ::c_int;
pub type dev_t = u64;
Expand Down Expand Up @@ -1110,5 +1109,23 @@ extern {
result: *mut *mut ::group) -> ::c_int;
}

mod other;
pub use self::other::*;
cfg_if! {
if #[cfg(target_arch = "arm")] {
mod arm;
pub use self::arm::*;
} else if #[cfg(target_arch = "powerpc")] {
mod powerpc;
pub use self::powerpc::*;
} else if #[cfg(target_arch = "sparc64")] {
mod sparc64;
pub use self::sparc64::*;
} else if #[cfg(target_arch = "x86_64")] {
mod x86_64;
pub use self::x86_64::*;
} else if #[cfg(target_arch = "x86")] {
mod x86;
pub use self::x86::*;
} else {
// Unknown target_arch
}
}
14 changes: 0 additions & 14 deletions src/unix/bsd/netbsdlike/netbsd/other/mod.rs

This file was deleted.

3 changes: 3 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/powerpc.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub type c_long = i32;
pub type c_ulong = u32;
pub type c_char = u8;
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub type c_long = i64;
pub type c_ulong = u64;
pub type c_char = i8;
3 changes: 3 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/x86.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub type c_long = i32;
pub type c_ulong = u32;
pub type c_char = i8;
3 changes: 3 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/x86_64.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub type c_long = i64;
pub type c_ulong = u64;
pub type c_char = i8;