Skip to content

Commit dbe6d2e

Browse files
committed
Move down c_long and c_ulong of linux/other/b64 to accommodate x32
1 parent 130cdb7 commit dbe6d2e

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

src/unix/notbsd/linux/other/b64/aarch64.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! AArch64-specific definitions for 64-bit linux-like values
22
3+
pub type c_long = i64;
4+
pub type c_ulong = u64;
35
pub type c_char = u8;
46
pub type wchar_t = u32;
57
pub type nlink_t = u32;

src/unix/notbsd/linux/other/b64/mod.rs

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
//! 64-bit specific definitions for linux-like values
22
3-
cfg_if! {
4-
if #[cfg(target_pointer_width = "32")] {
5-
pub type c_long = i32;
6-
pub type c_ulong = u32;
7-
} else {
8-
pub type c_long = i64;
9-
pub type c_ulong = u64;
10-
}
11-
}
12-
133
pub type clock_t = i64;
144
pub type time_t = i64;
155
pub type ino_t = u64;
@@ -74,7 +64,8 @@ cfg_if! {
7464
pub use self::x86_64::*;
7565
cfg_if! {
7666
if #[cfg(target_pointer_width = "32")] {
77-
// x32
67+
mod x32;
68+
pub use self::x32::*;
7869
} else {
7970
mod not_x32;
8071
pub use self::not_x32::*;

src/unix/notbsd/linux/other/b64/not_x32.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
pub type c_long = i64;
2+
pub type c_ulong = u64;
3+
14
pub const SYS_uselib: ::c_long = 134;
25
pub const SYS__sysctl: ::c_long = 156;
36
pub const SYS_create_module: ::c_long = 174;

src/unix/notbsd/linux/other/b64/powerpc64.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! PowerPC64-specific definitions for 64-bit linux-like values
22
3+
pub type c_long = i64;
4+
pub type c_ulong = u64;
35
pub type c_char = u8;
46
pub type wchar_t = i32;
57
pub type nlink_t = u64;

src/unix/notbsd/linux/other/b64/sparc64.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! SPARC64-specific definitions for 64-bit linux-like values
22
3+
pub type c_long = i64;
4+
pub type c_ulong = u64;
35
pub type c_char = i8;
46
pub type wchar_t = i32;
57
pub type nlink_t = u32;
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub type c_long = i32;
2+
pub type c_ulong = u32;

0 commit comments

Comments
 (0)