libc/new/glibc/mod.rs
1//! GNU libc.
2//!
3//! * Headers: <https://sourceware.org/git/?p=glibc.git> (official)
4//! * Headers: <https://github.com/sailfishos-mirror/glibc> (mirror)
5//!
6//! This module structure is modeled after glibc's source tree. Its build system selects headers
7//! from different locations based on the platform, which we mimic here with reexports.
8
9/// Source directory: `bits/`
10///
11/// This directory contains default
12///
13/// <https://github.com/sailfishos-mirror/glibc/tree/master/bits>
14mod bits {
15 #[cfg(target_os = "linux")]
16 pub(crate) mod signum_generic;
17 #[cfg(target_os = "linux")]
18 pub(crate) use super::sysdeps::unix::linux::bits::{
19 sigaction,
20 signum_arch,
21 socket,
22 statvfs,
23 types,
24 };
25}
26
27mod io {
28 pub(crate) mod sys;
29}
30
31/// Source directory: `posix/`
32///
33/// <https://github.com/sailfishos-mirror/glibc/tree/master/posix>
34mod posix {
35 pub(crate) mod unistd;
36}
37
38#[cfg(target_os = "linux")]
39pub(crate) mod signal;
40
41/// Source directory: `socket/`
42///
43/// <https://github.com/sailfishos-mirror/glibc/tree/master/socket>
44#[cfg(target_os = "linux")]
45mod socket;
46
47/// Source directory: `sysdeps/`
48///
49/// <https://github.com/sailfishos-mirror/glibc/tree/master/sysdeps>
50mod sysdeps {
51 // FIXME(pthread): eventually all platforms should use this module
52 #[cfg(target_os = "linux")]
53 pub(crate) mod nptl;
54 pub(crate) mod unix;
55
56 // You'll notice some directories that provide a `bits` module. These are included via
57 // `path = "..."` wherever the generic implementation lives.
58}
59
60pub(crate) mod sys;
61
62pub(crate) use posix::*;
63// FIXME(pthread): eventually all platforms should use this module
64#[cfg(target_os = "linux")]
65#[allow(unused)]
66pub(crate) use sysdeps::nptl::pthread;
67#[cfg(target_os = "linux")]
68pub(crate) use sysdeps::unix::linux::net;