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 = "hermit")] {
76 mod hermit_abi;
77 } else if #[cfg(target_os = "horizon")] {
79 mod horizon;
80 } else if #[cfg(target_os = "hurd")] {
82 mod hurd;
83 } else if #[cfg(target_os = "illumos")] {
85 mod illumos;
86 pub(crate) use illumos::*;
87 } else if #[cfg(target_os = "l4re")] {
88 mod l4re;
89 } else if #[cfg(target_os = "linux")] {
91 mod linux_uapi;
92 pub(crate) use linux_uapi::*;
93 } else if #[cfg(target_os = "netbsd")] {
94 mod netbsd;
95 pub(crate) use netbsd::*;
96 } else if #[cfg(any(target_os = "nto", target_os = "qnx"))] {
97 mod nto;
98 pub(crate) use nto::*;
99 } else if #[cfg(target_os = "nuttx")] {
100 mod nuttx;
101 pub(crate) use nuttx::*;
102 } else if #[cfg(target_os = "openbsd")] {
103 mod openbsd;
104 pub(crate) use openbsd::*;
105 } else if #[cfg(target_os = "qurt")] {
106 pub mod qurt;
107 } else if #[cfg(target_os = "redox")] {
108 mod redox;
109 } else if #[cfg(target_os = "rtems")] {
111 mod rtems;
112 } else if #[cfg(target_os = "solaris")] {
114 mod solaris;
115 pub(crate) use solaris::*;
116 } else if #[cfg(target_os = "solid_asp3")] {
117 mod solid;
118 } else if #[cfg(target_os = "teeos")] {
120 mod teeos;
121 } else if #[cfg(target_os = "trusty")] {
123 mod trusty;
124 } else if #[cfg(target_os = "vita")] {
126 mod vita;
127 } else if #[cfg(target_os = "vxworks")] {
129 mod vxworks;
130 pub(crate) use vxworks::*;
131 } else if #[cfg(target_os = "wasi")] {
132 mod wasi;
133 } else if #[cfg(target_os = "windows")] {
135 mod ucrt;
136 } else if #[cfg(target_os = "xous")] {
138 mod xous;
139 }
141}
142
143cfg_if! {
145 if #[cfg(all(
147 target_family = "unix",
148 target_env = "gnu",
149 not(target_os = "vxworks")
150 ))] {
151 mod glibc;
152 pub(crate) use glibc::*;
153 } else if #[cfg(any(target_env = "musl", target_env = "ohos"))] {
154 mod musl;
156 pub use musl::sched::*;
157 pub(crate) use musl::*;
158 } else if #[cfg(target_env = "newlib")] {
159 mod newlib;
160 pub(crate) use newlib::*;
161 } else if #[cfg(target_env = "relibc")] {
162 mod relibc;
163 pub(crate) use relibc::*;
164 } else if #[cfg(target_env = "sgx")] {
165 mod sgx;
166 } else if #[cfg(target_env = "uclibc")] {
168 mod uclibc;
169 pub(crate) use uclibc::*;
170 }
171}
172
173cfg_if! {
175 if #[cfg(target_os = "android")] {
176 use bionic_libc::kernel_uapi::linux;
177 pub use linux::types::*;
178 pub use sys::socket::*;
179 } else if #[cfg(target_os = "linux")] {
180 pub use linux::can::bcm::*;
181 pub use linux::can::error::*;
182 pub use linux::can::j1939::*;
183 pub use linux::can::netlink::*;
184 pub use linux::can::raw::*;
185 pub use linux::futex::*;
186 pub use linux::if_addr::*;
187 pub use linux::if_link::*;
188 pub use linux::if_packet::*;
189 pub use linux::keyctl::*;
190 pub use linux::membarrier::*;
191 pub use linux::mount::*;
192 pub use linux::netlink::*;
193 pub use linux::pidfd::*;
194 pub use linux::sctp::*;
195 pub use linux::tls::*;
196 pub use linux::types::*;
197 #[cfg(target_env = "gnu")]
198 pub use net::route::*;
199 } else if #[cfg(target_vendor = "apple")] {
200 pub use net::bpf::*;
201 pub use netinet6::in6_var::*;
202 pub use pthread_::introspection::*;
203 pub use pthread_::pthread_spis::*;
204 pub use pthread_::spawn::*;
205 pub use pthread_::stack_np::*;
206 pub use signal::*;
207 pub use sys::ioccom::*;
208 pub use sys::sockio::*;
209 pub use sys::ttycom::*;
210 } else if #[cfg(target_os = "l4re")] {
211 pub use l4re::packet::*;
212 } else if #[cfg(target_os = "netbsd")] {
213 pub use net::if_::*;
214 pub use sys::file::*;
215 pub use sys::ipc::*;
216 pub use sys::socket::*;
217 pub use sys::statvfs::*;
218 pub use sys::time::*;
219 pub use sys::timex::*;
220 pub use sys::types::*;
221 pub use utmp_::*;
222 pub use utmpx_::*;
223 } else if #[cfg(target_os = "openbsd")] {
224 pub use sys::ipc::*;
225 } else if #[cfg(any(target_os = "nto", target_os = "qnx"))] {
226 pub use net::bpf::*;
227 pub use net::if_::*;
228 } else if #[cfg(target_os = "freebsd")] {
229 pub use net::dlt::*;
230 pub use netinet6::in6_var::*;
231 pub use sys::file::*;
232 pub use sys::ioccom::*;
233 pub use sys::socket::*;
234 }
235}
236
237cfg_if! {
239 if #[cfg(any(target_env = "musl", target_env = "ohos"))] {
240 pub use sys::socket::*;
241 }
242}
243
244cfg_if! {
246 if #[cfg(all(target_family = "unix", not(target_os = "qurt")))] {
247 #[cfg(any(
249 target_os = "android",
250 target_os = "emscripten",
251 target_os = "l4re",
252 target_os = "linux"
253 ))]
254 pub use pthread::*;
255 pub use unistd::*;
256 }
257}