about summary refs log tree commit diff
path: root/src/libstd/os
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-11-12 00:59:30 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-11-12 00:59:30 +0530
commit3ef3fd96cf7abb284d069f57043d58dd07ab9edb (patch)
tree2f4bc2b6c23e8b03b4bb5b464b8800450052914b /src/libstd/os
parentf51e03043382675cb271032b5729431487dd491f (diff)
parentf9f734748cf3ac6bc5155afe288c0689cb57b918 (diff)
downloadrust-3ef3fd96cf7abb284d069f57043d58dd07ab9edb.tar.gz
rust-3ef3fd96cf7abb284d069f57043d58dd07ab9edb.zip
Rollup merge of #29775 - arcnmx:raw-c_char, r=alexcrichton
It's a bit strange to expect users of `libstd` to require the use of an external crates.io crate to work with standard types. This commit encourages the use `os::raw::c_char` instead, although users are certainly free to use `libc::c_char` if they wish; the test still exists to ensure the two types are identical (though the reported bug only exists on platforms that are not officially tested).

Fixes #29774
Diffstat (limited to 'src/libstd/os')
-rw-r--r--src/libstd/os/raw.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstd/os/raw.rs b/src/libstd/os/raw.rs
index 60069cf7bc3..17d6b2605c6 100644
--- a/src/libstd/os/raw.rs
+++ b/src/libstd/os/raw.rs
@@ -12,9 +12,13 @@
 
 #![stable(feature = "raw_os", since = "1.1.0")]
 
-#[cfg(any(target_arch = "aarch64", target_os = "android"))]
+#[cfg(any(target_os = "android",
+          all(target_os = "linux", any(target_arch = "aarch64",
+                                       target_arch = "arm"))))]
 #[stable(feature = "raw_os", since = "1.1.0")] pub type c_char = u8;
-#[cfg(not(any(target_arch = "aarch64", target_os = "android")))]
+#[cfg(not(any(target_os = "android",
+              all(target_os = "linux", any(target_arch = "aarch64",
+                                           target_arch = "arm")))))]
 #[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;