Skip to content

Commit fd06ed7

Browse files
authored
Auto merge of rust-lang#409 - jakllsch:netbsdlike-long-fixes, r=alexcrichton
Use correct type for c_ulong and c_long on 32-bit netbsdlike
2 parents 0e0ab04 + 07a0190 commit fd06ed7

File tree

6 files changed

+22
-2
lines changed

6 files changed

+22
-2
lines changed

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
pub type c_long = i64;
2-
pub type c_ulong = u64;
31
pub type time_t = i64;
42
pub type mode_t = u32;
53
pub type nlink_t = ::uint32_t;

src/unix/bsd/netbsdlike/netbsd.rs renamed to src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,3 +613,6 @@ extern {
613613
locale: *const ::c_char,
614614
base: ::locale_t) -> ::locale_t;
615615
}
616+
617+
mod other;
618+
pub use self::other::*;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub type c_long = i32;
2+
pub type c_ulong = u32;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub type c_long = i64;
2+
pub type c_ulong = u64;
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cfg_if! {
2+
if #[cfg(target_arch = "x86_64")] {
3+
mod b64;
4+
pub use self::b64::*;
5+
} else if #[cfg(any(target_arch = "arm",
6+
target_arch = "powerpc",
7+
target_arch = "x86"))] {
8+
mod b32;
9+
pub use self::b32::*;
10+
} else {
11+
// Unknown target_arch
12+
}
13+
}

src/unix/bsd/netbsdlike/openbsdlike/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
pub type c_long = i64;
2+
pub type c_ulong = u64;
13
pub type clock_t = i64;
24
pub type suseconds_t = i64;
35
pub type dev_t = i32;

0 commit comments

Comments
 (0)