about summary refs log tree commit diff
path: root/src/libstd/os
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2015-12-28 21:09:06 +0000
committerAnton Blanchard <anton@samba.org>2016-01-13 01:39:00 +0000
commitb372910476c40584a22cd253c69106775d0c93fa (patch)
tree7aca9d37fee606b735fb60588cd08c9f7297f8f3 /src/libstd/os
parent49c38277905f515537ce4d9610df87680ae76524 (diff)
downloadrust-b372910476c40584a22cd253c69106775d0c93fa.tar.gz
rust-b372910476c40584a22cd253c69106775d0c93fa.zip
Add powerpc64 and powerpc64le support
This adds support for big endian and little endian PowerPC64.
make check runs clean apart from one big endian backtrace issue.
Diffstat (limited to 'src/libstd/os')
-rw-r--r--src/libstd/os/linux/raw.rs3
-rw-r--r--src/libstd/os/raw.rs10
2 files changed, 10 insertions, 3 deletions
diff --git a/src/libstd/os/linux/raw.rs b/src/libstd/os/linux/raw.rs
index f44199f311b..953d0917141 100644
--- a/src/libstd/os/linux/raw.rs
+++ b/src/libstd/os/linux/raw.rs
@@ -205,7 +205,8 @@ mod arch {
     }
 }
 
-#[cfg(target_arch = "x86_64")]
+#[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
+          target_arch = "powerpc64le"))]
 mod arch {
     use super::{dev_t, mode_t};
     use os::raw::{c_long, c_int};
diff --git a/src/libstd/os/raw.rs b/src/libstd/os/raw.rs
index 3bc063f4269..62080fee48e 100644
--- a/src/libstd/os/raw.rs
+++ b/src/libstd/os/raw.rs
@@ -14,11 +14,17 @@
 
 #[cfg(any(target_os = "android",
           all(target_os = "linux", any(target_arch = "aarch64",
-                                       target_arch = "arm"))))]
+                                       target_arch = "arm",
+                                       target_arch = "powerpc",
+                                       target_arch = "powerpc64",
+                                       target_arch = "powerpc64le"))))]
 #[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = u8;
 #[cfg(not(any(target_os = "android",
               all(target_os = "linux", any(target_arch = "aarch64",
-                                           target_arch = "arm")))))]
+                                           target_arch = "arm",
+                                           target_arch = "powerpc",
+                                           target_arch = "powerpc64",
+                                           target_arch = "powerpc64le")))))]
 #[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = i8;
 #[stable(feature = "raw_os", since = "1.1.0")] pub type c_schar = i8;
 #[stable(feature = "raw_os", since = "1.1.0")] pub type c_uchar = u8;