Skip to content

Commit db3423b

Browse files
committed
redox: long is 32-bits on 32-bit systems
1 parent a90993e commit db3423b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/unix/redox/mod.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
11
pub type c_char = i8;
2-
pub type c_long = i64;
3-
pub type c_ulong = u64;
42
pub type wchar_t = i32;
53

4+
cfg_if! {
5+
if #[cfg(target_pointer_width = "32")] {
6+
pub type c_long = i32;
7+
pub type c_ulong = u32;
8+
}
9+
}
10+
11+
cfg_if! {
12+
if #[cfg(target_pointer_width = "64")] {
13+
pub type c_long = i64;
14+
pub type c_ulong = u64;
15+
}
16+
}
17+
618
pub type blkcnt_t = ::c_ulong;
719
pub type blksize_t = ::c_long;
820
pub type clock_t = ::c_long;

0 commit comments

Comments
 (0)