libc/new/common/
mod.rs

1//! Interfaces that are common across multiple platforms
2//!
3//! We make these available everywhere but each platform must opt in to reexporting.
4//!
5//! There shouldn't be any repeated definitions or complex configuration in this module. On
6//! platforms that don't use common APIs it is fine to use `#[cfg(not(...))]`, but if a platform
7//! needs a custom definition then it should be defined in the platform-specific module.
8//!
9//! The goal is that platforms need to opt in to the definitions here, so that worst case we have
10//! an unused warning on untested platforms (rather than exposing incorrect API).
11
12#[cfg(any(
13    target_vendor = "apple",
14    target_os = "dragonfly",
15    target_os = "freebsd",
16    target_os = "netbsd",
17    target_os = "openbsd",
18))]
19pub(crate) mod bsd;
20
21#[cfg(any(
22    target_os = "android",
23    target_os = "emscripten",
24    target_os = "l4re",
25    target_os = "linux",
26))]
27pub(crate) mod linux_like;
28
29#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
30pub(crate) mod freebsd_like;
31
32#[cfg(any(target_os = "netbsd", target_os = "openbsd"))]
33pub(crate) mod netbsd_like;
34
35#[cfg(any(target_os = "illumos", target_os = "solaris"))]
36pub(crate) mod solarish;
37
38#[cfg(target_family = "unix")]
39pub(crate) mod posix;