about summary refs log tree commit diff
path: root/library/std/src/sys/io/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/io/mod.rs')
-rw-r--r--library/std/src/sys/io/mod.rs40
1 files changed, 40 insertions, 0 deletions
diff --git a/library/std/src/sys/io/mod.rs b/library/std/src/sys/io/mod.rs
new file mode 100644
index 00000000000..4605b56f8f1
--- /dev/null
+++ b/library/std/src/sys/io/mod.rs
@@ -0,0 +1,40 @@
+#![forbid(unsafe_op_in_unsafe_fn)]
+
+mod io_slice {
+    cfg_if::cfg_if! {
+        if #[cfg(any(target_family = "unix", target_os = "hermit", target_os = "solid_asp3"))] {
+            mod iovec;
+            pub use iovec::*;
+        } else if #[cfg(target_os = "windows")] {
+            mod windows;
+            pub use windows::*;
+        } else if #[cfg(target_os = "wasi")] {
+            mod wasi;
+            pub use wasi::*;
+        } else {
+            mod unsupported;
+            pub use unsupported::*;
+        }
+    }
+}
+
+mod is_terminal {
+    cfg_if::cfg_if! {
+        if #[cfg(any(target_family = "unix", target_os = "wasi"))] {
+            mod isatty;
+            pub use isatty::*;
+        } else if #[cfg(target_os = "windows")] {
+            mod windows;
+            pub use windows::*;
+        } else if #[cfg(target_os = "hermit")] {
+            mod hermit;
+            pub use hermit::*;
+        } else {
+            mod unsupported;
+            pub use unsupported::*;
+        }
+    }
+}
+
+pub use io_slice::{IoSlice, IoSliceMut};
+pub use is_terminal::is_terminal;