cfg_select! {
any(
target_os = "macos", target_os = "ios",
target_os = "linux", target_os = "android",
target_os = "freebsd", target_os = "netbsd") =>
{
#[cfg(test)]
#[allow(dead_code)]
pub(crate) const MIN_USERS: usize = 1;
}
windows => {
#[cfg(test)]
#[allow(dead_code)]
pub(crate) const MIN_USERS: usize = 1;
}
_ => {
#[cfg(test)]
#[allow(dead_code)]
pub(crate) const MIN_USERS: usize = 0;
}
}
#[cfg(feature = "network")]
pub(crate) mod network_data;
cfg_select! {
any(target_os = "linux", target_os = "android") => {
pub(crate) mod linux;
pub(crate) use linux as sys;
}
any(target_os = "macos", target_os = "ios") => {
pub(crate) mod apple;
pub(crate) use apple as sys;
}
target_os = "freebsd" => {
pub(crate) mod freebsd;
pub(crate) use freebsd as sys;
}
target_os = "netbsd" => {
pub(crate) mod netbsd;
pub(crate) use netbsd as sys;
}
windows => {
pub(crate) mod windows;
pub(crate) use windows as sys;
}
_ => {
compile_error!(
"sinf supports Linux, Android, macOS, iOS, FreeBSD, NetBSD and Windows"
);
}
}
cfg_select! {
any(
target_os = "linux",
target_os = "android",
target_os = "macos",
target_os = "ios",
target_os = "freebsd",
target_os = "netbsd",
) => {
pub(crate) mod unix;
}
_ => {}
}
cfg_select! {
any(target_os = "freebsd", target_os = "netbsd") => {
pub(crate) mod bsd;
}
_ => {}
}