diff --git a/Cargo.toml b/Cargo.toml index 1bc6d5003..2366913a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ rustc-std-workspace-alloc = { version = "1.0.0", optional = true } # not aliased [target.'cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))'.dependencies] linux-raw-sys = { version = "0.12", default-features = false, features = ["auxvec", "general", "errno", "ioctl", "no_std", "elf"] } libc_errno = { package = "errno", version = "0.3.10", default-features = false, optional = true } -libc = { version = "0.2.182", default-features = false, optional = true } +libc = { version = "0.2.186", default-features = false, optional = true } # Dependencies for platforms where only libc is supported: # diff --git a/src/backend/libc/conv.rs b/src/backend/libc/conv.rs index 1cb1fc93a..2f1aaf1b2 100644 --- a/src/backend/libc/conv.rs +++ b/src/backend/libc/conv.rs @@ -33,10 +33,7 @@ pub(super) fn borrowed_fd(fd: BorrowedFd<'_>) -> LibcFd { fd.as_raw_fd() as LibcFd } -#[cfg(all( - feature = "alloc", - not(any(windows, target_os = "espidf", target_os = "redox")) -))] +#[cfg(all(feature = "alloc", not(any(windows, target_os = "espidf"))))] #[inline] pub(super) fn owned_fd(fd: OwnedFd) -> LibcFd { fd.into_raw_fd() as LibcFd diff --git a/src/backend/libc/event/syscalls.rs b/src/backend/libc/event/syscalls.rs index 3827a2f99..f4bb8faf7 100644 --- a/src/backend/libc/event/syscalls.rs +++ b/src/backend/libc/event/syscalls.rs @@ -485,7 +485,7 @@ pub(crate) fn port_send( unsafe { ret(c::port_send(borrowed_fd(port), events, userdata)) } } -#[cfg(not(any(target_os = "redox", target_os = "wasi")))] +#[cfg(not(target_os = "wasi"))] pub(crate) fn pause() { let r = unsafe { c::pause() }; let errno = libc_errno::errno().0; diff --git a/src/backend/libc/event/types.rs b/src/backend/libc/event/types.rs index a04d7e6cf..16ec2dac4 100644 --- a/src/backend/libc/event/types.rs +++ b/src/backend/libc/event/types.rs @@ -1,10 +1,16 @@ -#[cfg(any(linux_kernel, target_os = "freebsd", target_os = "illumos"))] +#[cfg(any( + linux_kernel, + target_os = "freebsd", + target_os = "illumos", + target_os = "redox" +))] use crate::backend::c; #[cfg(any( linux_kernel, target_os = "freebsd", target_os = "illumos", - target_os = "espidf" + target_os = "espidf", + target_os = "redox" ))] use bitflags::bitflags; @@ -12,7 +18,8 @@ use bitflags::bitflags; linux_kernel, target_os = "freebsd", target_os = "illumos", - target_os = "espidf" + target_os = "espidf", + target_os = "redox" ))] bitflags! { /// `EFD_*` flags for use with [`eventfd`]. diff --git a/src/backend/libc/fs/mod.rs b/src/backend/libc/fs/mod.rs index e5e821ea7..bed841c98 100644 --- a/src/backend/libc/fs/mod.rs +++ b/src/backend/libc/fs/mod.rs @@ -1,4 +1,4 @@ -#[cfg(all(feature = "alloc", not(any(target_os = "espidf", target_os = "redox"))))] +#[cfg(all(feature = "alloc", not(target_os = "espidf")))] pub(crate) mod dir; #[cfg(linux_kernel)] pub mod inotify; diff --git a/src/backend/libc/fs/syscalls.rs b/src/backend/libc/fs/syscalls.rs index 8b7f082f5..7556c73a6 100644 --- a/src/backend/libc/fs/syscalls.rs +++ b/src/backend/libc/fs/syscalls.rs @@ -1,9 +1,9 @@ //! libc syscalls supporting `rustix::fs`. use crate::backend::c; -#[cfg(any(not(target_os = "redox"), feature = "alloc"))] -use crate::backend::conv::ret_usize; -use crate::backend::conv::{borrowed_fd, c_str, ret, ret_c_int, ret_off_t, ret_owned_fd}; +use crate::backend::conv::{ + borrowed_fd, c_str, ret, ret_c_int, ret_off_t, ret_owned_fd, ret_usize, +}; use crate::fd::{BorrowedFd, OwnedFd}; #[allow(unused_imports)] use crate::ffi; @@ -12,7 +12,7 @@ use crate::ffi::CStr; use crate::ffi::CString; #[cfg(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita")))] use crate::fs::Access; -#[cfg(not(any(target_os = "espidf", target_os = "redox")))] +#[cfg(not(target_os = "espidf"))] use crate::fs::AtFlags; #[cfg(not(any( netbsdlike, @@ -51,13 +51,7 @@ use crate::fs::SealFlags; use crate::fs::StatFs; #[cfg(not(any(target_os = "espidf", target_os = "vita")))] use crate::fs::Timestamps; -#[cfg(not(any( - apple, - target_os = "espidf", - target_os = "redox", - target_os = "vita", - target_os = "wasi" -)))] +#[cfg(not(any(apple, target_os = "espidf", target_os = "vita", target_os = "wasi")))] use crate::fs::{Dev, FileType}; use crate::fs::{Mode, OFlags, SeekFrom, Stat}; #[cfg(not(target_os = "wasi"))] @@ -205,7 +199,6 @@ fn openat_via_syscall( } } -#[cfg(not(target_os = "redox"))] pub(crate) fn openat( dirfd: BorrowedFd<'_>, path: &CStr, @@ -287,7 +280,6 @@ pub(crate) fn readlink(path: &CStr, buf: &mut [u8]) -> io::Result { unsafe { ret_usize(c::readlink(c_str(path), buf.as_mut_ptr().cast(), buf.len()) as isize) } } -#[cfg(not(target_os = "redox"))] #[inline] pub(crate) unsafe fn readlinkat( dirfd: BorrowedFd<'_>, @@ -301,7 +293,6 @@ pub(crate) fn mkdir(path: &CStr, mode: Mode) -> io::Result<()> { unsafe { ret(c::mkdir(c_str(path), mode.bits() as c::mode_t)) } } -#[cfg(not(target_os = "redox"))] pub(crate) fn mkdirat(dirfd: BorrowedFd<'_>, path: &CStr, mode: Mode) -> io::Result<()> { unsafe { ret(c::mkdirat( @@ -337,7 +328,7 @@ pub(crate) fn link(old_path: &CStr, new_path: &CStr) -> io::Result<()> { unsafe { ret(c::link(c_str(old_path), c_str(new_path))) } } -#[cfg(not(any(target_os = "espidf", target_os = "redox")))] +#[cfg(not(target_os = "espidf"))] pub(crate) fn linkat( old_dirfd: BorrowedFd<'_>, old_path: &CStr, @@ -400,7 +391,7 @@ pub(crate) fn unlink(path: &CStr) -> io::Result<()> { unsafe { ret(c::unlink(c_str(path))) } } -#[cfg(not(any(target_os = "espidf", target_os = "redox")))] +#[cfg(not(target_os = "espidf"))] pub(crate) fn unlinkat(dirfd: BorrowedFd<'_>, path: &CStr, flags: AtFlags) -> io::Result<()> { // macOS ≤ 10.9 lacks `unlinkat`. #[cfg(target_os = "macos")] @@ -627,7 +618,6 @@ pub(crate) fn symlink(old_path: &CStr, new_path: &CStr) -> io::Result<()> { unsafe { ret(c::symlink(c_str(old_path), c_str(new_path))) } } -#[cfg(not(target_os = "redox"))] pub(crate) fn symlinkat( old_path: &CStr, new_dirfd: BorrowedFd<'_>, @@ -729,7 +719,7 @@ pub(crate) fn lstat(path: &CStr) -> io::Result { } } -#[cfg(not(any(target_os = "espidf", target_os = "redox")))] +#[cfg(not(target_os = "espidf"))] pub(crate) fn statat(dirfd: BorrowedFd<'_>, path: &CStr, flags: AtFlags) -> io::Result { // See the comments in `fstat` about using `crate::fs::statx` here. #[cfg(all( @@ -811,7 +801,6 @@ pub(crate) fn access(path: &CStr, access: Access) -> io::Result<()> { target_os = "emscripten", target_os = "espidf", target_os = "horizon", - target_os = "redox", target_os = "vita" )))] pub(crate) fn accessat( @@ -879,12 +868,7 @@ pub(crate) fn accessat( Ok(()) } -#[cfg(not(any( - target_os = "espidf", - target_os = "horizon", - target_os = "redox", - target_os = "vita" -)))] +#[cfg(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita")))] pub(crate) fn utimensat( dirfd: BorrowedFd<'_>, path: &CStr, @@ -1092,12 +1076,7 @@ pub(crate) fn chmod(path: &CStr, mode: Mode) -> io::Result<()> { unsafe { ret(c::chmod(c_str(path), mode.bits() as c::mode_t)) } } -#[cfg(not(any( - linux_kernel, - target_os = "espidf", - target_os = "redox", - target_os = "wasi" -)))] +#[cfg(not(any(linux_kernel, target_os = "espidf", target_os = "wasi")))] pub(crate) fn chmodat( dirfd: BorrowedFd<'_>, path: &CStr, @@ -1175,7 +1154,7 @@ pub(crate) fn fclonefileat( } } -#[cfg(not(any(target_os = "espidf", target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(target_os = "espidf", target_os = "wasi")))] pub(crate) fn chownat( dirfd: BorrowedFd<'_>, path: &CStr, @@ -1199,7 +1178,6 @@ pub(crate) fn chownat( apple, target_os = "espidf", target_os = "horizon", - target_os = "redox", target_os = "vita", target_os = "wasi" )))] diff --git a/src/backend/libc/fs/types.rs b/src/backend/libc/fs/types.rs index b8944ad7c..964859998 100644 --- a/src/backend/libc/fs/types.rs +++ b/src/backend/libc/fs/types.rs @@ -620,7 +620,6 @@ impl FileType { target_os = "espidf", target_os = "haiku", target_os = "nto", - target_os = "redox", target_os = "vita" )))] #[inline] diff --git a/src/backend/libc/io/syscalls.rs b/src/backend/libc/io/syscalls.rs index d91e983c2..7ae26cb99 100644 --- a/src/backend/libc/io/syscalls.rs +++ b/src/backend/libc/io/syscalls.rs @@ -98,7 +98,6 @@ pub(crate) fn writev(fd: BorrowedFd<'_>, bufs: &[IoSlice<'_>]) -> io::Result c::c_int); target_os = "haiku", target_os = "horizon", target_os = "openbsd", - target_os = "redox", target_os = "vita", target_os = "wasi", )))] diff --git a/src/backend/libc/time/syscalls.rs b/src/backend/libc/time/syscalls.rs index 8c730cef0..61b734c45 100644 --- a/src/backend/libc/time/syscalls.rs +++ b/src/backend/libc/time/syscalls.rs @@ -7,7 +7,8 @@ use crate::backend::conv::ret; target_os = "freebsd", target_os = "fuchsia", target_os = "illumos", - target_os = "netbsd" + target_os = "netbsd", + target_os = "redox" ))] #[cfg(any(all(target_env = "gnu", fix_y2038), not(fix_y2038)))] use crate::backend::time::types::LibcItimerspec; @@ -17,11 +18,7 @@ use crate::io; #[cfg(not(fix_y2038))] use crate::timespec::as_libc_timespec_mut_ptr; #[cfg(not(fix_y2038))] -#[cfg(not(any( - target_os = "redox", - target_os = "wasi", - all(apple, not(target_os = "macos")) -)))] +#[cfg(not(any(target_os = "wasi", all(apple, not(target_os = "macos")))))] use crate::timespec::as_libc_timespec_ptr; #[cfg(all(target_env = "gnu", fix_y2038))] use crate::timespec::LibcTimespec; @@ -32,7 +29,8 @@ use core::mem::MaybeUninit; target_os = "freebsd", target_os = "fuchsia", target_os = "illumos", - target_os = "netbsd" + target_os = "netbsd", + target_os = "redox" ))] use { crate::backend::conv::{borrowed_fd, ret_owned_fd}, @@ -53,7 +51,7 @@ weak!(fn __timerfd_gettime64(c::c_int, *mut LibcItimerspec) -> c::c_int); #[cfg(all(target_env = "gnu", fix_y2038))] weak!(fn __timerfd_settime64(c::c_int, c::c_int, *const LibcItimerspec, *mut LibcItimerspec) -> c::c_int); -#[cfg(not(any(target_os = "redox", target_os = "wasi")))] +#[cfg(not(target_os = "wasi"))] #[inline] #[must_use] pub(crate) fn clock_getres(id: ClockId) -> Timespec { @@ -258,11 +256,7 @@ fn clock_gettime_dynamic_old(id: c::clockid_t) -> io::Result { }) } -#[cfg(not(any( - target_os = "redox", - target_os = "wasi", - all(apple, not(target_os = "macos")) -)))] +#[cfg(not(any(target_os = "wasi", all(apple, not(target_os = "macos")))))] #[inline] pub(crate) fn clock_settime(id: ClockId, timespec: Timespec) -> io::Result<()> { // Old 32-bit version: libc has `clock_gettime` but it is not y2038 safe by @@ -292,11 +286,7 @@ pub(crate) fn clock_settime(id: ClockId, timespec: Timespec) -> io::Result<()> { } } -#[cfg(not(any( - target_os = "redox", - target_os = "wasi", - all(apple, not(target_os = "macos")) -)))] +#[cfg(not(any(target_os = "wasi", all(apple, not(target_os = "macos")))))] #[cfg(fix_y2038)] fn clock_settime_old(id: ClockId, timespec: Timespec) -> io::Result<()> { let old_timespec = c::timespec { @@ -315,7 +305,8 @@ fn clock_settime_old(id: ClockId, timespec: Timespec) -> io::Result<()> { target_os = "freebsd", target_os = "fuchsia", target_os = "illumos", - target_os = "netbsd" + target_os = "netbsd", + target_os = "redox" ))] pub(crate) fn timerfd_create(id: TimerfdClockId, flags: TimerfdFlags) -> io::Result { unsafe { ret_owned_fd(c::timerfd_create(id as c::clockid_t, bitflags_bits!(flags))) } @@ -326,7 +317,8 @@ pub(crate) fn timerfd_create(id: TimerfdClockId, flags: TimerfdFlags) -> io::Res target_os = "freebsd", target_os = "fuchsia", target_os = "illumos", - target_os = "netbsd" + target_os = "netbsd", + target_os = "redox" ))] pub(crate) fn timerfd_settime( fd: BorrowedFd<'_>, @@ -374,7 +366,8 @@ pub(crate) fn timerfd_settime( target_os = "freebsd", target_os = "fuchsia", target_os = "illumos", - target_os = "netbsd" + target_os = "netbsd", + target_os = "redox" ))] #[cfg(fix_y2038)] fn timerfd_settime_old( @@ -447,7 +440,8 @@ fn timerfd_settime_old( target_os = "freebsd", target_os = "fuchsia", target_os = "illumos", - target_os = "netbsd" + target_os = "netbsd", + target_os = "redox" ))] pub(crate) fn timerfd_gettime(fd: BorrowedFd<'_>) -> io::Result { // Old 32-bit version: libc has `timerfd_gettime` but it is not y2038 safe @@ -484,7 +478,8 @@ pub(crate) fn timerfd_gettime(fd: BorrowedFd<'_>) -> io::Result { target_os = "freebsd", target_os = "fuchsia", target_os = "illumos", - target_os = "netbsd" + target_os = "netbsd", + target_os = "redox" ))] #[cfg(fix_y2038)] fn timerfd_gettime_old(fd: BorrowedFd<'_>) -> io::Result { diff --git a/src/event/mod.rs b/src/event/mod.rs index 29dfc2272..408f44dad 100644 --- a/src/event/mod.rs +++ b/src/event/mod.rs @@ -11,7 +11,7 @@ pub mod epoll; mod eventfd; #[cfg(bsd)] pub mod kqueue; -#[cfg(not(any(windows, target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(windows, target_os = "wasi")))] mod pause; mod poll; #[cfg(solarish)] @@ -24,10 +24,11 @@ pub use crate::timespec::{Nsecs, Secs, Timespec}; linux_kernel, target_os = "freebsd", target_os = "illumos", - target_os = "espidf" + target_os = "espidf", + target_os = "redox" ))] pub use eventfd::{eventfd, EventfdFlags}; -#[cfg(not(any(windows, target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(windows, target_os = "wasi")))] pub use pause::*; pub use poll::{poll, PollFd, PollFlags}; #[cfg(any(bsd, linux_kernel, windows, target_os = "wasi"))] diff --git a/src/fs/at.rs b/src/fs/at.rs index f35ce5aca..e808dc0fe 100644 --- a/src/fs/at.rs +++ b/src/fs/at.rs @@ -12,7 +12,7 @@ use crate::buffer::Buffer; use crate::fd::OwnedFd; #[cfg(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita")))] use crate::fs::Access; -#[cfg(not(any(target_os = "espidf", target_os = "redox")))] +#[cfg(not(target_os = "espidf"))] use crate::fs::AtFlags; #[cfg(apple)] use crate::fs::CloneFlags; @@ -40,23 +40,13 @@ use {crate::fs::Timestamps, crate::timespec::Nsecs}; /// `UTIME_NOW` for use with [`utimensat`]. /// /// [`utimensat`]: crate::fs::utimensat -#[cfg(not(any( - target_os = "espidf", - target_os = "horizon", - target_os = "redox", - target_os = "vita" -)))] +#[cfg(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita")))] pub const UTIME_NOW: Nsecs = backend::c::UTIME_NOW as Nsecs; /// `UTIME_OMIT` for use with [`utimensat`]. /// /// [`utimensat`]: crate::fs::utimensat -#[cfg(not(any( - target_os = "espidf", - target_os = "horizon", - target_os = "redox", - target_os = "vita" -)))] +#[cfg(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita")))] pub const UTIME_OMIT: Nsecs = backend::c::UTIME_OMIT as Nsecs; /// `openat(dirfd, path, oflags, mode)`—Opens a file. @@ -73,7 +63,6 @@ pub const UTIME_OMIT: Nsecs = backend::c::UTIME_OMIT as Nsecs; /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/openat.html /// [Linux]: https://man7.org/linux/man-pages/man2/openat.2.html -#[cfg(not(target_os = "redox"))] #[inline] pub fn openat( dirfd: Fd, @@ -96,7 +85,7 @@ pub fn openat( /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/readlinkat.html /// [Linux]: https://man7.org/linux/man-pages/man2/readlinkat.2.html -#[cfg(all(feature = "alloc", not(target_os = "redox")))] +#[cfg(feature = "alloc")] #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] #[inline] pub fn readlinkat>>( @@ -107,7 +96,7 @@ pub fn readlinkat>>( path.into_with_c_str(|path| _readlinkat(dirfd.as_fd(), path, reuse.into())) } -#[cfg(all(feature = "alloc", not(target_os = "redox")))] +#[cfg(feature = "alloc")] #[allow(unsafe_code)] fn _readlinkat(dirfd: BorrowedFd<'_>, path: &CStr, mut buffer: Vec) -> io::Result { buffer.clear(); @@ -171,7 +160,6 @@ fn _readlinkat(dirfd: BorrowedFd<'_>, path: &CStr, mut buffer: Vec) -> io::R /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/readlinkat.html /// [Linux]: https://man7.org/linux/man-pages/man2/readlinkat.2.html -#[cfg(not(target_os = "redox"))] #[inline] pub fn readlinkat_raw>( dirfd: Fd, @@ -194,7 +182,6 @@ pub fn readlinkat_raw>( /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/mkdirat.html /// [Linux]: https://man7.org/linux/man-pages/man2/mkdirat.2.html -#[cfg(not(target_os = "redox"))] #[inline] pub fn mkdirat(dirfd: Fd, path: P, mode: Mode) -> io::Result<()> { path.into_with_c_str(|path| backend::fs::syscalls::mkdirat(dirfd.as_fd(), path, mode)) @@ -209,7 +196,7 @@ pub fn mkdirat(dirfd: Fd, path: P, mode: Mode) -> io::Re /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/linkat.html /// [Linux]: https://man7.org/linux/man-pages/man2/linkat.2.html -#[cfg(not(any(target_os = "espidf", target_os = "redox")))] +#[cfg(not(target_os = "espidf"))] #[inline] pub fn linkat( old_dirfd: PFd, @@ -243,7 +230,7 @@ pub fn linkat( /// [`REMOVEDIR`]: AtFlags::REMOVEDIR /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/unlinkat.html /// [Linux]: https://man7.org/linux/man-pages/man2/unlinkat.2.html -#[cfg(not(any(target_os = "espidf", target_os = "redox")))] +#[cfg(not(target_os = "espidf"))] #[inline] pub fn unlinkat(dirfd: Fd, path: P, flags: AtFlags) -> io::Result<()> { path.into_with_c_str(|path| backend::fs::syscalls::unlinkat(dirfd.as_fd(), path, flags)) @@ -321,7 +308,6 @@ pub fn renameat_with( /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/symlinkat.html /// [Linux]: https://man7.org/linux/man-pages/man2/symlinkat.2.html -#[cfg(not(target_os = "redox"))] #[inline] pub fn symlinkat( old_path: P, @@ -348,7 +334,7 @@ pub fn symlinkat( /// [Linux]: https://man7.org/linux/man-pages/man2/fstatat.2.html /// [`Mode::from_raw_mode`]: crate::fs::Mode::from_raw_mode /// [`FileType::from_raw_mode`]: crate::fs::FileType::from_raw_mode -#[cfg(not(any(target_os = "espidf", target_os = "redox")))] +#[cfg(not(target_os = "espidf"))] #[inline] #[doc(alias = "fstatat")] pub fn statat(dirfd: Fd, path: P, flags: AtFlags) -> io::Result { @@ -371,12 +357,7 @@ pub fn statat(dirfd: Fd, path: P, flags: AtFlags) -> io: /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/faccessat.html /// [Linux]: https://man7.org/linux/man-pages/man2/faccessat.2.html -#[cfg(not(any( - target_os = "espidf", - target_os = "horizon", - target_os = "vita", - target_os = "redox" -)))] +#[cfg(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita",)))] #[inline] #[doc(alias = "faccessat")] pub fn accessat( @@ -396,12 +377,7 @@ pub fn accessat( /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/utimensat.html /// [Linux]: https://man7.org/linux/man-pages/man2/utimensat.2.html -#[cfg(not(any( - target_os = "espidf", - target_os = "horizon", - target_os = "vita", - target_os = "redox" -)))] +#[cfg(not(any(target_os = "espidf", target_os = "horizon", target_os = "vita",)))] #[inline] pub fn utimensat( dirfd: Fd, @@ -424,7 +400,7 @@ pub fn utimensat( /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/fchmodat.html /// [Linux]: https://man7.org/linux/man-pages/man2/fchmodat.2.html -#[cfg(not(any(target_os = "espidf", target_os = "wasi", target_os = "redox")))] +#[cfg(not(any(target_os = "espidf", target_os = "wasi")))] #[inline] #[doc(alias = "fchmodat")] pub fn chmodat( @@ -469,7 +445,6 @@ pub fn fclonefileat( target_os = "horizon", target_os = "vita", target_os = "wasi", - target_os = "redox", )))] #[inline] pub fn mknodat( @@ -512,7 +487,7 @@ pub fn mkfifoat(dirfd: Fd, path: P, mode: Mode) -> io::R /// /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/fchownat.html /// [Linux]: https://man7.org/linux/man-pages/man2/fchownat.2.html -#[cfg(not(any(target_os = "espidf", target_os = "wasi", target_os = "redox")))] +#[cfg(not(any(target_os = "espidf", target_os = "wasi")))] #[inline] #[doc(alias = "fchownat")] pub fn chownat( diff --git a/src/io/read_write.rs b/src/io/read_write.rs index 0e0969103..a2c13a9ac 100644 --- a/src/io/read_write.rs +++ b/src/io/read_write.rs @@ -219,7 +219,6 @@ pub fn writev(fd: Fd, bufs: &[IoSlice<'_>]) -> io::Result { target_os = "haiku", target_os = "horizon", target_os = "nto", - target_os = "redox", target_os = "solaris", target_os = "vita", )))] @@ -258,7 +257,6 @@ pub fn preadv(fd: Fd, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io: target_os = "haiku", target_os = "horizon", target_os = "nto", - target_os = "redox", target_os = "solaris", target_os = "vita", )))] diff --git a/src/thread/clock.rs b/src/thread/clock.rs index d6be40e87..c6ed287a8 100644 --- a/src/thread/clock.rs +++ b/src/thread/clock.rs @@ -9,7 +9,6 @@ pub use crate::timespec::{Nsecs, Secs, Timespec}; target_os = "espidf", target_os = "freebsd", // FreeBSD 12 has clock_nanosleep, but libc targets FreeBSD 11. target_os = "openbsd", - target_os = "redox", target_os = "vita", target_os = "wasi", )))] @@ -36,7 +35,6 @@ pub use crate::clockid::ClockId; target_os = "haiku", target_os = "horizon", target_os = "openbsd", - target_os = "redox", target_os = "vita", target_os = "wasi", )))] @@ -66,7 +64,6 @@ pub fn clock_nanosleep_relative(id: ClockId, request: &Timespec) -> NanosleepRel target_os = "haiku", target_os = "horizon", target_os = "openbsd", - target_os = "redox", target_os = "vita", target_os = "wasi", )))] diff --git a/tests/fs/chmodat.rs b/tests/fs/chmodat.rs index 7567ed7fd..0a8c75873 100644 --- a/tests/fs/chmodat.rs +++ b/tests/fs/chmodat.rs @@ -27,7 +27,7 @@ fn test_chmod() { assert_ne!(reverted.st_mode as u64 & libc::S_IRWXU as u64, 0); } -#[cfg(not(any(target_os = "redox", target_os = "wasi")))] +#[cfg(not(target_os = "wasi"))] #[test] fn test_chmodat() { use rustix::fs::{chmodat, openat, statat, symlinkat, AtFlags, Mode, OFlags, CWD}; diff --git a/tests/fs/fcntl.rs b/tests/fs/fcntl.rs index e2c4414b7..738406acd 100644 --- a/tests/fs/fcntl.rs +++ b/tests/fs/fcntl.rs @@ -1,4 +1,4 @@ -#[cfg(not(any(target_os = "redox", target_os = "wasi")))] +#[cfg(not(target_os = "wasi"))] #[test] fn test_fcntl_dupfd_cloexec() { use rustix::fd::AsFd as _; diff --git a/tests/fs/file.rs b/tests/fs/file.rs index cb7e0c7fe..a4bdba7e3 100644 --- a/tests/fs/file.rs +++ b/tests/fs/file.rs @@ -9,7 +9,6 @@ )))] use core::num::NonZeroU64; -#[cfg(not(target_os = "redox"))] #[test] fn test_file() { rustix::fs::accessat( diff --git a/tests/fs/invalid_offset.rs b/tests/fs/invalid_offset.rs index cf84c9912..8e16ba623 100644 --- a/tests/fs/invalid_offset.rs +++ b/tests/fs/invalid_offset.rs @@ -7,7 +7,7 @@ //! These tests are disabled on iOS/macOS since those platforms kill the //! process with `Signal::XFSZ` instead of returning an error. -#![cfg(not(any(target_os = "redox", target_os = "wasi")))] +#![cfg(not(target_os = "wasi"))] use rustix::fs::SeekFrom; diff --git a/tests/fs/linkat.rs b/tests/fs/linkat.rs index 42ad21177..ad161cc81 100644 --- a/tests/fs/linkat.rs +++ b/tests/fs/linkat.rs @@ -29,7 +29,6 @@ fn test_link() { ); } -#[cfg(not(target_os = "redox"))] #[test] fn test_linkat() { use rustix::fs::{linkat, openat, readlinkat, statat, AtFlags, Mode, OFlags, CWD}; diff --git a/tests/fs/mkdirat.rs b/tests/fs/mkdirat.rs index f405490b5..fbd6351e0 100644 --- a/tests/fs/mkdirat.rs +++ b/tests/fs/mkdirat.rs @@ -15,7 +15,6 @@ fn test_mkdir() { rmdir(tmp.path().join("file")).unwrap(); } -#[cfg(not(target_os = "redox"))] #[test] fn test_mkdirat() { use rustix::fs::{ diff --git a/tests/fs/mknodat.rs b/tests/fs/mknodat.rs index cf35b95ea..8ba53cee0 100644 --- a/tests/fs/mknodat.rs +++ b/tests/fs/mknodat.rs @@ -1,4 +1,4 @@ -#[cfg(not(any(apple, target_os = "redox", target_os = "wasi")))] +#[cfg(not(any(apple, target_os = "wasi")))] #[test] fn test_mknodat() { use rustix::fs::{ diff --git a/tests/fs/special.rs b/tests/fs/special.rs index de72b027e..58bb0e36f 100644 --- a/tests/fs/special.rs +++ b/tests/fs/special.rs @@ -1,5 +1,5 @@ #[cfg(feature = "process")] -#[cfg(not(any(target_os = "redox", target_os = "wasi")))] +#[cfg(not(target_os = "wasi"))] #[test] fn test_special_fds() { use rustix::fs::{fstat, open, openat, Mode, OFlags, Stat, ABS, CWD}; diff --git a/tests/fs/y2038.rs b/tests/fs/y2038.rs index 749dd043f..31164a397 100644 --- a/tests/fs/y2038.rs +++ b/tests/fs/y2038.rs @@ -5,7 +5,6 @@ #[cfg(not(all(target_env = "musl", target_pointer_width = "32")))] #[cfg(not(all(target_os = "android", target_pointer_width = "32")))] #[cfg(not(all(target_os = "emscripten", target_pointer_width = "32")))] -#[cfg(not(target_os = "redox"))] #[cfg(not(target_os = "cygwin"))] #[test] fn test_y2038_with_utimensat() { @@ -81,7 +80,6 @@ fn test_y2038_with_utimensat() { #[cfg(not(all(target_env = "musl", target_pointer_width = "32")))] #[cfg(not(all(target_os = "android", target_pointer_width = "32")))] #[cfg(not(all(target_os = "emscripten", target_pointer_width = "32")))] -#[cfg(not(target_os = "redox"))] #[cfg(not(target_os = "cygwin"))] #[test] fn test_y2038_with_futimens() { diff --git a/tests/thread/clocks.rs b/tests/thread/clocks.rs index 915f3e35e..e5c3f2842 100644 --- a/tests/thread/clocks.rs +++ b/tests/thread/clocks.rs @@ -4,17 +4,14 @@ target_os = "emscripten", target_os = "haiku", target_os = "openbsd", - target_os = "redox", target_os = "wasi", )))] use rustix::thread::{clock_nanosleep_absolute, clock_nanosleep_relative, ClockId}; -#[cfg(not(target_os = "redox"))] use { rustix::io, rustix::thread::{nanosleep, NanosleepRelativeResult, Timespec}, }; -#[cfg(not(target_os = "redox"))] #[test] fn test_invalid_nanosleep() { match nanosleep(&Timespec { @@ -53,7 +50,6 @@ fn test_invalid_nanosleep() { target_os = "emscripten", target_os = "haiku", target_os = "openbsd", - target_os = "redox", target_os = "wasi", )))] #[cfg(not(target_os = "netbsd"))] // NetBSD doesn't seem to enforce valid timespecs. @@ -107,7 +103,6 @@ fn test_invalid_nanosleep_absolute() { target_os = "emscripten", target_os = "haiku", target_os = "openbsd", - target_os = "redox", target_os = "wasi", )))] #[test] @@ -154,7 +149,6 @@ fn test_invalid_nanosleep_relative() { } } -#[cfg(not(target_os = "redox"))] #[test] fn test_zero_nanosleep() { match nanosleep(&Timespec { @@ -172,7 +166,6 @@ fn test_zero_nanosleep() { target_os = "emscripten", target_os = "haiku", target_os = "openbsd", - target_os = "redox", target_os = "wasi", )))] #[test] @@ -195,7 +188,6 @@ fn test_zero_nanosleep_absolute() { target_os = "emscripten", target_os = "haiku", target_os = "openbsd", - target_os = "redox", target_os = "wasi", )))] #[test]