1mod common;
18
19cfg_if! {
44 if #[cfg(target_os = "aix")] {
45 mod aix;
46 pub(crate) use aix::*;
47 } else if #[cfg(target_os = "android")] {
48 mod bionic_libc;
49 pub(crate) use bionic_libc::*;
50 } else if #[cfg(target_vendor = "apple")] {
51 mod apple;
52 pub(crate) use apple::*;
53 } else if #[cfg(target_os = "cygwin")] {
54 mod cygwin;
55 pub(crate) use cygwin::*;
56 } else if #[cfg(target_os = "dragonfly")] {
57 mod dragonfly;
58 pub(crate) use dragonfly::*;
59 } else if #[cfg(target_os = "emscripten")] {
60 mod emscripten;
61 pub use emscripten::sched::*;
62 pub(crate) use emscripten::*;
63 } else if #[cfg(target_os = "espidf")] {
64 mod espidf;
65 } else if #[cfg(target_os = "freebsd")] {
67 mod freebsd;
68 pub(crate) use freebsd::*;
69 } else if #[cfg(target_os = "fuchsia")] {
70 mod fuchsia;
71 pub(crate) use fuchsia::*;
72 } else if #[cfg(target_os = "haiku")] {
73 mod haiku;
74 pub(crate) use haiku::*;
75 } else if #[cfg(target_os = "helenos")] {
76 mod helenos;
77 pub(crate) use helenos::*;
78 } else if #[cfg(target_os = "hermit")] {
79 mod hermit_abi;
80 } else if #[cfg(target_os = "horizon")] {
82 mod horizon;
83 } else if #[cfg(target_os = "hurd")] {
85 mod hurd;
86 } else if #[cfg(target_os = "illumos")] {
88 mod illumos;
89 pub(crate) use illumos::*;
90 } else if #[cfg(target_os = "l4re")] {
91 mod l4re;
92 } else if #[cfg(target_os = "linux")] {
94 mod linux_uapi;
95 pub(crate) use linux_uapi::*;
96 } else if #[cfg(target_os = "netbsd")] {
97 mod netbsd;
98 pub(crate) use netbsd::*;
99 } else if #[cfg(any(target_os = "nto", target_os = "qnx"))] {
100 mod nto;
101 pub(crate) use nto::*;
102 } else if #[cfg(target_os = "nuttx")] {
103 mod nuttx;
104 pub(crate) use nuttx::*;
105 } else if #[cfg(target_os = "openbsd")] {
106 mod openbsd;
107 pub(crate) use openbsd::*;
108 } else if #[cfg(target_os = "qurt")] {
109 pub mod qurt;
110 } else if #[cfg(target_os = "redox")] {
111 mod redox;
112 } else if #[cfg(target_os = "rtems")] {
114 mod rtems;
115 } else if #[cfg(target_os = "solaris")] {
117 mod solaris;
118 pub(crate) use solaris::*;
119 } else if #[cfg(target_os = "solid_asp3")] {
120 mod solid;
121 } else if #[cfg(target_os = "teeos")] {
123 mod teeos;
124 } else if #[cfg(target_os = "trusty")] {
126 mod trusty;
127 } else if #[cfg(target_os = "vita")] {
129 mod vita;
130 } else if #[cfg(target_os = "vxworks")] {
132 mod vxworks;
133 pub(crate) use vxworks::*;
134 } else if #[cfg(target_os = "wasi")] {
135 mod wasi;
136 } else if #[cfg(target_os = "windows")] {
138 mod ucrt;
139 } else if #[cfg(target_os = "xous")] {
141 mod xous;
142 }
144}
145
146cfg_if! {
148 if #[cfg(all(
150 target_family = "unix",
151 target_env = "gnu",
152 not(target_os = "vxworks")
153 ))] {
154 mod glibc;
155 pub(crate) use glibc::*;
156 } else if #[cfg(any(target_env = "musl", target_env = "ohos"))] {
157 mod musl;
159 pub use musl::sched::*;
160 pub(crate) use musl::*;
161 } else if #[cfg(target_env = "newlib")] {
162 mod newlib;
163 pub(crate) use newlib::*;
164 } else if #[cfg(target_env = "relibc")] {
165 mod relibc;
166 pub(crate) use relibc::*;
167 } else if #[cfg(target_env = "sgx")] {
168 mod sgx;
169 } else if #[cfg(target_env = "uclibc")] {
171 mod uclibc;
172 pub(crate) use uclibc::*;
173 }
174}
175
176cfg_if! {
178 if #[cfg(target_os = "android")] {
179 use bionic_libc::kernel_uapi::linux;
180 pub use linux::types::*;
181 pub use sys::socket::*;
182 } else if #[cfg(target_os = "linux")] {
183 pub use asm::socket::*;
184 pub use linux::can::bcm::*;
185 pub use linux::can::error::*;
186 pub use linux::can::j1939::*;
187 pub use linux::can::netlink::*;
188 pub use linux::can::raw::*;
189 pub use linux::futex::*;
190 pub use linux::if_addr::*;
191 pub use linux::if_link::*;
192 pub use linux::if_packet::*;
193 pub use linux::keyctl::*;
194 pub use linux::membarrier::*;
195 pub use linux::mount::*;
196 pub use linux::netlink::*;
197 pub use linux::pidfd::*;
198 pub use linux::sctp::*;
199 pub use linux::tls::*;
200 pub use linux::types::*;
201
202 #[cfg(target_env = "gnu")]
203 pub use self::{
204 net::route::*,
205 signal::*,
206 sys::socket::*,
207 sys::statvfs::*,
208 };
209 #[cfg(target_env = "uclibc")]
210 pub use self::{
211 socket::*,
212 sysdeps::linux::common::bits::siginfo::*,
213 };
214 } else if #[cfg(target_vendor = "apple")] {
215 #[cfg(target_os = "macos")]
216 pub use net::bpf::*;
217 pub use netinet::tcp::*;
218 #[cfg(target_os = "macos")]
219 pub use netinet6::in6_var::*;
220 pub use pthread_::introspection::*;
221 pub use pthread_::pthread_spis::*;
222 pub use pthread_::spawn::*;
223 pub use pthread_::stack_np::*;
224 pub use signal::*;
225 pub use sys::ioccom::*;
226 pub use sys::sockio::*;
227 pub use sys::ttycom::*;
228 } else if #[cfg(target_os = "l4re")] {
229 pub use l4re::packet::*;
230 } else if #[cfg(target_os = "netbsd")] {
231 pub use net::if_::*;
232 pub use sys::file::*;
233 pub use sys::ipc::*;
234 pub use sys::socket::*;
235 pub use sys::statvfs::*;
236 pub use sys::time::*;
237 pub use sys::timex::*;
238 pub use sys::types::*;
239 pub use utmp_::*;
240 pub use utmpx_::*;
241 } else if #[cfg(target_os = "openbsd")] {
242 pub use sys::ipc::*;
243 pub use sys::sensors::*;
244 pub use sys::sysctl::*;
245 } else if #[cfg(any(target_os = "nto", target_os = "qnx"))] {
246 pub use net::bpf::*;
247 pub use net::if_::*;
248 } else if #[cfg(target_os = "freebsd")] {
249 pub use net::dlt::*;
250 pub use net::if_mib::*;
252 pub use net::route::*;
253 pub use netinet6::in6_var::*;
254 pub use sys::file::*;
255 pub use sys::ioccom::*;
256 pub use sys::socket::*;
257 } else if #[cfg(target_os = "helenos")] {
258 pub use abi::errno::*;
259 pub use bits::*;
260 pub use dirent_mod::*;
261 pub use errno::*;
262 pub use fibril_synch::*;
263 pub use inet::dnsr::*;
264 pub use inet::tcp::*;
265 pub use stdlib::*;
266 pub use vfs::vfs::*;
267 }
268}
269
270cfg_if! {
272 if #[cfg(any(target_env = "musl", target_env = "ohos"))] {
273 pub use signal::*;
274 pub use sys::socket::*;
275 }
276}
277
278cfg_if! {
280 if #[cfg(all(target_family = "unix", not(target_os = "qurt")))] {
281 #[cfg(any(
283 target_os = "android",
284 target_os = "emscripten",
285 target_os = "l4re",
286 target_os = "linux"
287 ))]
288 pub use pthread::*;
289 pub use unistd::*;
290 }
291}