summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-06 19:10:09 +0000
committerbors <bors@rust-lang.org>2018-08-06 19:10:09 +0000
commit27114a96afa9ee990785c7cc0da90988a94640bd (patch)
treee5525967b6e74fae9155ca3d1ad724ca137af1e0
parent6bdbf5dc937459bd10e6bc4dc52b0adbd8cf4358 (diff)
parent80f2d7d999a78aad0477e53fa04b0fe4f359da35 (diff)
downloadrust-libc-27114a96afa9ee990785c7cc0da90988a94640bd.tar.gz
Auto merge of #1057 - jakllsch:netbsd-5298beff-d081-4368-ab2a-0987e84c6d02, r=alexcrichton
NetBSD: correct c_char signedness on arm and powerpc
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/arm.rs (renamed from src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs)1
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs23
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/other/mod.rs14
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/powerpc.rs3
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/sparc64.rs (renamed from src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs)1
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/x86.rs3
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/x86_64.rs3
7 files changed, 31 insertions, 17 deletions
diff --git a/src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs b/src/unix/bsd/netbsdlike/netbsd/arm.rs
index 9b0b338b91..377e05be07 100644
--- a/src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/arm.rs
@@ -1,2 +1,3 @@
pub type c_long = i32;
pub type c_ulong = u32;
+pub type c_char = u8;
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index 065f6bd36a..b0cf20f65e 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -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;
@@ -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
+ }
+}
diff --git a/src/unix/bsd/netbsdlike/netbsd/other/mod.rs b/src/unix/bsd/netbsdlike/netbsd/other/mod.rs
deleted file mode 100644
index 3a9bf0866c..0000000000
--- a/src/unix/bsd/netbsdlike/netbsd/other/mod.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-cfg_if! {
- if #[cfg(any(target_arch = "sparc64",
- target_arch = "x86_64"))] {
- mod b64;
- pub use self::b64::*;
- } else if #[cfg(any(target_arch = "arm",
- target_arch = "powerpc",
- target_arch = "x86"))] {
- mod b32;
- pub use self::b32::*;
- } else {
- // Unknown target_arch
- }
-}
diff --git a/src/unix/bsd/netbsdlike/netbsd/powerpc.rs b/src/unix/bsd/netbsdlike/netbsd/powerpc.rs
new file mode 100644
index 0000000000..377e05be07
--- /dev/null
+++ b/src/unix/bsd/netbsdlike/netbsd/powerpc.rs
@@ -0,0 +1,3 @@
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type c_char = u8;
diff --git a/src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs b/src/unix/bsd/netbsdlike/netbsd/sparc64.rs
index b07c476aa4..27b9412668 100644
--- a/src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/sparc64.rs
@@ -1,2 +1,3 @@
pub type c_long = i64;
pub type c_ulong = u64;
+pub type c_char = i8;
diff --git a/src/unix/bsd/netbsdlike/netbsd/x86.rs b/src/unix/bsd/netbsdlike/netbsd/x86.rs
new file mode 100644
index 0000000000..a00e3337ef
--- /dev/null
+++ b/src/unix/bsd/netbsdlike/netbsd/x86.rs
@@ -0,0 +1,3 @@
+pub type c_long = i32;
+pub type c_ulong = u32;
+pub type c_char = i8;
diff --git a/src/unix/bsd/netbsdlike/netbsd/x86_64.rs b/src/unix/bsd/netbsdlike/netbsd/x86_64.rs
new file mode 100644
index 0000000000..27b9412668
--- /dev/null
+++ b/src/unix/bsd/netbsdlike/netbsd/x86_64.rs
@@ -0,0 +1,3 @@
+pub type c_long = i64;
+pub type c_ulong = u64;
+pub type c_char = i8;