summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan A. Kollasch <jakllsch@kollasch.net>2018-08-06 12:15:45 -0500
committerJonathan A. Kollasch <jakllsch@kollasch.net>2018-08-06 12:15:45 -0500
commit174888fd56e75c628ba8fa8664c6e73de55c419f (patch)
treef5b27913408d8fcd07d1c2c544f2fc343dc6e647
parent6bdbf5dc937459bd10e6bc4dc52b0adbd8cf4358 (diff)
downloadrust-libc-174888fd56e75c628ba8fa8664c6e73de55c419f.tar.gz
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..27695fc6c4 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;