diff --git a/src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs b/src/unix/bsd/netbsdlike/netbsd/arm.rs similarity index 68% rename from src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs rename to src/unix/bsd/netbsdlike/netbsd/arm.rs index 9b0b338b91e5b..377e05be07e17 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 065f6bd36a221..b0cf20f65e1cb 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 3a9bf0866c0bc..0000000000000 --- 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 0000000000000..377e05be07e17 --- /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 similarity index 68% rename from src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs rename to src/unix/bsd/netbsdlike/netbsd/sparc64.rs index b07c476aa49d9..27b94126688fb 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 0000000000000..a00e3337ef58f --- /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 0000000000000..27b94126688fb --- /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;