about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJeremy Soller <jackpot51@gmail.com>2016-11-10 20:13:14 -0700
committerJeremy Soller <jackpot51@gmail.com>2016-11-10 20:13:14 -0700
commit25e1a4a0084a56807d7a1e4ca676e078c085b3aa (patch)
treed88a969fc9249891872e642ddfb238abbadc3d9b
parent79a8c272fb8ad09600ef58ff223c73eb44343040 (diff)
downloadrust-25e1a4a0084a56807d7a1e4ca676e078c085b3aa.tar.gz
rust-25e1a4a0084a56807d7a1e4ca676e078c085b3aa.zip
Use target_os = redox for cfg
-rw-r--r--src/libstd/fs.rs2
-rw-r--r--src/libstd/os/mod.rs5
-rw-r--r--src/libstd/sys/mod.rs2
-rw-r--r--src/libstd/sys_common/mod.rs4
4 files changed, 5 insertions, 8 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index 5845963d31a..3fc1267c06e 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -353,7 +353,7 @@ impl File {
     ///
     /// This function is only implemented on Redox, but could be
     /// implemented on other operating systems using readlink
-    #[cfg(redox)]
+    #[cfg(target_os = "redox")]
     #[stable(feature = "rust1", since = "1.14.0")]
     pub fn path(&self) -> io::Result<PathBuf> {
         self.inner.path()
diff --git a/src/libstd/os/mod.rs b/src/libstd/os/mod.rs
index 744ee6c22e5..58f1604de1c 100644
--- a/src/libstd/os/mod.rs
+++ b/src/libstd/os/mod.rs
@@ -13,10 +13,7 @@
 #![stable(feature = "os", since = "1.0.0")]
 #![allow(missing_docs, bad_style)]
 
-#[cfg(redox)]
-#[stable(feature = "rust1", since = "1.0.0")]
-pub use sys::ext as unix;
-#[cfg(unix)]
+#[cfg(any(target_os = "redox", unix))]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub use sys::ext as unix;
 #[cfg(windows)]
diff --git a/src/libstd/sys/mod.rs b/src/libstd/sys/mod.rs
index c196bf39432..a237d8a067e 100644
--- a/src/libstd/sys/mod.rs
+++ b/src/libstd/sys/mod.rs
@@ -32,7 +32,7 @@
 
 pub use self::imp::*;
 
-#[cfg(redox)]
+#[cfg(target_os = "redox")]
 #[path = "redox/mod.rs"]
 mod imp;
 
diff --git a/src/libstd/sys_common/mod.rs b/src/libstd/sys_common/mod.rs
index bbd2f679bca..5f5ea09c78d 100644
--- a/src/libstd/sys_common/mod.rs
+++ b/src/libstd/sys_common/mod.rs
@@ -43,10 +43,10 @@ pub mod thread_local;
 pub mod util;
 pub mod wtf8;
 
-#[cfg(redox)]
+#[cfg(target_os = "redox")]
 pub use sys::net;
 
-#[cfg(not(redox))]
+#[cfg(not(target_os = "redox"))]
 pub mod net;
 
 #[cfg(any(not(cargobuild), feature = "backtrace"))]