//! Feature tests for OS functionality pubuseself::os::*;
#[cfg(any(linux_android, target_os = "emscripten"))] mod os { usecrate::sys::utsname::uname; usecrate::Result; use std::os::unix::ffi::OsStrExt; use std::sync::atomic::{AtomicUsize, Ordering};
/// Check if the OS supports atomic close-on-exec for sockets pubfn socket_atomic_cloexec() -> bool {
kernel_version()
.map(|version| version >= VERS_2_6_27)
.unwrap_or(false)
}
#[cfg(any(
freebsdlike, // FreeBSD since 10.0 DragonFlyBSD since ???
netbsdlike, // NetBSD since 6.0 OpenBSD since 5.7
target_os = "hurd", // Since glibc 2.28
target_os = "illumos", // Since ???
target_os = "redox", // Since 1-july-2020
target_os = "cygwin",
))] mod os { /// Check if the OS supports atomic close-on-exec for sockets pubconstfn socket_atomic_cloexec() -> bool { true
}
}
#[cfg(any(
target_os = "aix",
apple_targets,
target_os = "fuchsia",
target_os = "haiku",
target_os = "solaris"
))] mod os { /// Check if the OS supports atomic close-on-exec for sockets pubconstfn socket_atomic_cloexec() -> bool { false
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.