//! Feature tests for OS functionality pubuseself::os::*;
#[cfg(linux_android)] 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
))] 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
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-18)
¤
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.