From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/rustix/src/io/dup.rs | 1 + vendor/rustix/src/io/fcntl.rs | 12 ++++++------ vendor/rustix/src/io/ioctl.rs | 18 +++++------------- vendor/rustix/src/io/read_write.rs | 6 ++++-- 4 files changed, 16 insertions(+), 21 deletions(-) (limited to 'vendor/rustix/src/io') diff --git a/vendor/rustix/src/io/dup.rs b/vendor/rustix/src/io/dup.rs index 9f5186192..46fb38ad3 100644 --- a/vendor/rustix/src/io/dup.rs +++ b/vendor/rustix/src/io/dup.rs @@ -115,6 +115,7 @@ pub fn dup2(fd: Fd, new: &mut OwnedFd) -> io::Result<()> { target_os = "aix", target_os = "espidf", target_os = "nto", + target_os = "vita", target_os = "wasi" )))] #[inline] diff --git a/vendor/rustix/src/io/fcntl.rs b/vendor/rustix/src/io/fcntl.rs index 913e9d062..1880ac7db 100644 --- a/vendor/rustix/src/io/fcntl.rs +++ b/vendor/rustix/src/io/fcntl.rs @@ -1,10 +1,10 @@ -//! The Unix `fcntl` function is effectively lots of different functions -//! hidden behind a single dynamic dispatch interface. In order to provide -//! a type-safe API, rustix makes them all separate functions so that they -//! can have dedicated static type signatures. +//! The Unix `fcntl` function is effectively lots of different functions hidden +//! behind a single dynamic dispatch interface. In order to provide a type-safe +//! API, rustix makes them all separate functions so that they can have +//! dedicated static type signatures. //! -//! `fcntl` functions which are not specific to files or directories live -//! in the [`io`] module instead. +//! `fcntl` functions which are not specific to files or directories live in +//! the [`io`] module instead. //! //! [`io`]: crate::io diff --git a/vendor/rustix/src/io/ioctl.rs b/vendor/rustix/src/io/ioctl.rs index e85719a4d..f89160bf3 100644 --- a/vendor/rustix/src/io/ioctl.rs +++ b/vendor/rustix/src/io/ioctl.rs @@ -14,16 +14,8 @@ use backend::fd::AsFd; /// `ioctl(fd, FIOCLEX, NULL)`—Set the close-on-exec flag. /// -/// Also known as `fcntl(fd, F_SETFD, FD_CLOEXEC)`. -/// -/// # References -/// - [Winsock2] -/// - [NetBSD] -/// - [OpenBSD] -/// -/// [Winsock2]: https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-ioctlsocket -/// [NetBSD]: https://man.netbsd.org/ioctl.2#GENERIC%20IOCTLS -/// [OpenBSD]: https://man.openbsd.org/ioctl.2#GENERIC_IOCTLS +/// This is similar to `fcntl(fd, F_SETFD, FD_CLOEXEC)`, except that it avoids +/// clearing any other flags that might be set. #[cfg(apple)] #[inline] #[doc(alias = "FIOCLEX")] @@ -58,8 +50,8 @@ pub fn ioctl_fionbio(fd: Fd, value: bool) -> io::Result<()> { /// `ioctl(fd, FIONREAD)`—Returns the number of bytes ready to be read. /// -/// The result of this function gets silently coerced into a C `int` -/// by the OS, so it may contain a wrapped value. +/// The result of this function gets silently coerced into a C `int` by the OS, +/// so it may contain a wrapped value. /// /// # References /// - [Linux] @@ -73,7 +65,7 @@ pub fn ioctl_fionbio(fd: Fd, value: bool) -> io::Result<()> { /// [FreeBSD]: https://man.freebsd.org/cgi/man.cgi?query=ioctl&sektion=2#GENERIC%09IOCTLS /// [NetBSD]: https://man.netbsd.org/ioctl.2#GENERIC%20IOCTLS /// [OpenBSD]: https://man.openbsd.org/ioctl.2#GENERIC_IOCTLS -#[cfg(not(target_os = "espidf"))] +#[cfg(not(any(target_os = "espidf", target_os = "vita")))] #[inline] #[doc(alias = "FIONREAD")] pub fn ioctl_fionread(fd: Fd) -> io::Result { diff --git a/vendor/rustix/src/io/read_write.rs b/vendor/rustix/src/io/read_write.rs index 91a28bc39..fe454adba 100644 --- a/vendor/rustix/src/io/read_write.rs +++ b/vendor/rustix/src/io/read_write.rs @@ -192,7 +192,8 @@ pub fn writev(fd: Fd, bufs: &[IoSlice<'_>]) -> io::Result { target_os = "haiku", target_os = "nto", target_os = "redox", - target_os = "solaris" + target_os = "solaris", + target_os = "vita" )))] #[inline] pub fn preadv(fd: Fd, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io::Result { @@ -225,7 +226,8 @@ pub fn preadv(fd: Fd, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io: target_os = "haiku", target_os = "nto", target_os = "redox", - target_os = "solaris" + target_os = "solaris", + target_os = "vita" )))] #[inline] pub fn pwritev(fd: Fd, bufs: &[IoSlice<'_>], offset: u64) -> io::Result { -- cgit v1.2.3