summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco A L Barbosa <malbarbo@gmail.com>2017-10-18 12:16:11 -0200
committerMarco A L Barbosa <malbarbo@gmail.com>2017-10-18 21:08:51 -0200
commit1ff381788748c472bef01452b19c9f128570f219 (patch)
treec704175ede65ba5e771182cbdb727738b8f5f2fb
parent1994be3183158446578485b04b44d2bafc79e0f6 (diff)
downloadrust-libc-1ff381788748c472bef01452b19c9f128570f219.tar.gz
Move down c_long and c_ulong of linux/other/b64 to accommodate x32
-rw-r--r--src/unix/notbsd/linux/other/b64/aarch64.rs2
-rw-r--r--src/unix/notbsd/linux/other/b64/mod.rs13
-rw-r--r--src/unix/notbsd/linux/other/b64/not_x32.rs3
-rw-r--r--src/unix/notbsd/linux/other/b64/powerpc64.rs2
-rw-r--r--src/unix/notbsd/linux/other/b64/sparc64.rs2
-rw-r--r--src/unix/notbsd/linux/other/b64/x32.rs2
6 files changed, 13 insertions, 11 deletions
diff --git a/src/unix/notbsd/linux/other/b64/aarch64.rs b/src/unix/notbsd/linux/other/b64/aarch64.rs
index c918916dd0..0496600a59 100644
--- a/src/unix/notbsd/linux/other/b64/aarch64.rs
+++ b/src/unix/notbsd/linux/other/b64/aarch64.rs
@@ -1,5 +1,7 @@
//! AArch64-specific definitions for 64-bit linux-like values
+pub type c_long = i64;
+pub type c_ulong = u64;
pub type c_char = u8;
pub type wchar_t = u32;
pub type nlink_t = u32;
diff --git a/src/unix/notbsd/linux/other/b64/mod.rs b/src/unix/notbsd/linux/other/b64/mod.rs
index 8e24163803..b7d23c5618 100644
--- a/src/unix/notbsd/linux/other/b64/mod.rs
+++ b/src/unix/notbsd/linux/other/b64/mod.rs
@@ -1,15 +1,5 @@
//! 64-bit specific definitions for linux-like values
-cfg_if! {
- if #[cfg(target_pointer_width = "32")] {
- pub type c_long = i32;
- pub type c_ulong = u32;
- } else {
- pub type c_long = i64;
- pub type c_ulong = u64;
- }
-}
-
pub type clock_t = i64;
pub type time_t = i64;
pub type ino_t = u64;
@@ -74,7 +64,8 @@ cfg_if! {
pub use self::x86_64::*;
cfg_if! {
if #[cfg(target_pointer_width = "32")] {
- // x32
+ mod x32;
+ pub use self::x32::*;
} else {
mod not_x32;
pub use self::not_x32::*;
diff --git a/src/unix/notbsd/linux/other/b64/not_x32.rs b/src/unix/notbsd/linux/other/b64/not_x32.rs
index 872677f1fa..fce838c099 100644
--- a/src/unix/notbsd/linux/other/b64/not_x32.rs
+++ b/src/unix/notbsd/linux/other/b64/not_x32.rs
@@ -1,3 +1,6 @@
+pub type c_long = i64;
+pub type c_ulong = u64;
+
pub const SYS_uselib: ::c_long = 134;
pub const SYS__sysctl: ::c_long = 156;
pub const SYS_create_module: ::c_long = 174;
diff --git a/src/unix/notbsd/linux/other/b64/powerpc64.rs b/src/unix/notbsd/linux/other/b64/powerpc64.rs
index 09c662a528..c1c8695b82 100644
--- a/src/unix/notbsd/linux/other/b64/powerpc64.rs
+++ b/src/unix/notbsd/linux/other/b64/powerpc64.rs
@@ -1,5 +1,7 @@
//! PowerPC64-specific definitions for 64-bit linux-like values
+pub type c_long = i64;
+pub type c_ulong = u64;
pub type c_char = u8;
pub type wchar_t = i32;
pub type nlink_t = u64;
diff --git a/src/unix/notbsd/linux/other/b64/sparc64.rs b/src/unix/notbsd/linux/other/b64/sparc64.rs
index 9acea962b3..279ba73c1d 100644
--- a/src/unix/notbsd/linux/other/b64/sparc64.rs
+++ b/src/unix/notbsd/linux/other/b64/sparc64.rs
@@ -1,5 +1,7 @@
//! SPARC64-specific definitions for 64-bit linux-like values
+pub type c_long = i64;
+pub type c_ulong = u64;
pub type c_char = i8;
pub type wchar_t = i32;
pub type nlink_t = u32;
diff --git a/src/unix/notbsd/linux/other/b64/x32.rs b/src/unix/notbsd/linux/other/b64/x32.rs
new file mode 100644
index 0000000000..9b0b338b91
--- /dev/null
+++ b/src/unix/notbsd/linux/other/b64/x32.rs
@@ -0,0 +1,2 @@
+pub type c_long = i32;
+pub type c_ulong = u32;