]> git.lizzy.rs Git - rust.git/blob - src/libstd/os/mod.rs
Ensure `record_layout_for_printing()` is inlined.
[rust.git] / src / libstd / os / mod.rs
1 //! OS-specific functionality.
2
3 #![stable(feature = "os", since = "1.0.0")]
4 #![allow(missing_docs, nonstandard_style, missing_debug_implementations)]
5
6 cfg_if! {
7     if #[cfg(rustdoc)] {
8
9         // When documenting libstd we want to show unix/windows/linux modules as
10         // these are the "main modules" that are used across platforms. This
11         // should help show platform-specific functionality in a hopefully
12         // cross-platform way in the documentation
13
14         #[stable(feature = "rust1", since = "1.0.0")]
15         pub use sys::unix_ext as unix;
16
17         #[stable(feature = "rust1", since = "1.0.0")]
18         pub use sys::windows_ext as windows;
19
20         #[doc(cfg(target_os = "linux"))]
21         pub mod linux;
22     } else {
23
24         // If we're not documenting libstd then we just expose the main modules
25         // as we otherwise would.
26
27         #[cfg(any(target_os = "redox", unix))]
28         #[stable(feature = "rust1", since = "1.0.0")]
29         pub use sys::ext as unix;
30
31         #[cfg(windows)]
32         #[stable(feature = "rust1", since = "1.0.0")]
33         pub use sys::ext as windows;
34
35         #[cfg(any(target_os = "linux", target_os = "l4re"))]
36         pub mod linux;
37
38     }
39 }
40
41 #[cfg(target_os = "android")]    pub mod android;
42 #[cfg(target_os = "bitrig")]     pub mod bitrig;
43 #[cfg(target_os = "dragonfly")]  pub mod dragonfly;
44 #[cfg(target_os = "freebsd")]    pub mod freebsd;
45 #[cfg(target_os = "haiku")]      pub mod haiku;
46 #[cfg(target_os = "ios")]        pub mod ios;
47 #[cfg(target_os = "macos")]      pub mod macos;
48 #[cfg(target_os = "netbsd")]     pub mod netbsd;
49 #[cfg(target_os = "openbsd")]    pub mod openbsd;
50 #[cfg(target_os = "solaris")]    pub mod solaris;
51 #[cfg(target_os = "emscripten")] pub mod emscripten;
52 #[cfg(target_os = "fuchsia")]    pub mod fuchsia;
53 #[cfg(target_os = "hermit")]     pub mod hermit;
54 #[cfg(all(target_vendor = "fortanix", target_env = "sgx"))] pub mod fortanix_sgx;
55
56 pub mod raw;