diff options
| author | bors <bors@rust-lang.org> | 2024-08-13 09:10:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-13 09:10:32 +0000 |
| commit | a2e1d154d53d0a87b78af3591ceadc9477151220 (patch) | |
| tree | 931c0d1c155423dd4fca03eaae3c69a537100609 | |
| parent | 591ecb88dffdb0f233e2fae74fd3d7c81d65ff0c (diff) | |
| parent | 70e0f69632591add54bc1e4d625e7bbb9fa02095 (diff) | |
| download | rust-a2e1d154d53d0a87b78af3591ceadc9477151220.tar.gz rust-a2e1d154d53d0a87b78af3591ceadc9477151220.zip | |
Auto merge of #128962 - devnexen:fs_get_mode_haiku, r=workingjubilee
std::fs: get_mode implementation for all unix
| -rw-r--r-- | library/std/src/sys/pal/unix/fs.rs | 27 | ||||
| m--------- | src/llvm-project | 0 |
2 files changed, 0 insertions, 27 deletions
diff --git a/library/std/src/sys/pal/unix/fs.rs b/library/std/src/sys/pal/unix/fs.rs index bdb83f07857..be13e1ae9b3 100644 --- a/library/std/src/sys/pal/unix/fs.rs +++ b/library/std/src/sys/pal/unix/fs.rs @@ -1552,17 +1552,6 @@ impl fmt::Debug for File { None } - #[cfg(any( - target_os = "linux", - target_os = "freebsd", - target_os = "hurd", - target_os = "netbsd", - target_os = "openbsd", - target_os = "vxworks", - target_os = "solaris", - target_os = "illumos", - target_vendor = "apple", - ))] fn get_mode(fd: c_int) -> Option<(bool, bool)> { let mode = unsafe { libc::fcntl(fd, libc::F_GETFL) }; if mode == -1 { @@ -1576,22 +1565,6 @@ impl fmt::Debug for File { } } - #[cfg(not(any( - target_os = "linux", - target_os = "freebsd", - target_os = "hurd", - target_os = "netbsd", - target_os = "openbsd", - target_os = "vxworks", - target_os = "solaris", - target_os = "illumos", - target_vendor = "apple", - )))] - fn get_mode(_fd: c_int) -> Option<(bool, bool)> { - // FIXME(#24570): implement this for other Unix platforms - None - } - let fd = self.as_raw_fd(); let mut b = f.debug_struct("File"); b.field("fd", &fd); diff --git a/src/llvm-project b/src/llvm-project -Subproject ccf4c38bdd73f1a37ec266c73bdaef80e39f8cf +Subproject 57ae1a3474057fead2c438928ed368b3740bf0e |
