Auto merge of #128962 - devnexen:fs_get_mode_haiku, r=workingjubilee · patricklam/verify-rust-std@37017c0 (original) (raw)

Original file line number Diff line number Diff line change
@@ -1552,17 +1552,6 @@ impl fmt::Debug for File {
1552 1552 None
1553 1553 }
1554 1554
1555 -#[cfg(any(
1556 - target_os = "linux",
1557 - target_os = "freebsd",
1558 - target_os = "hurd",
1559 - target_os = "netbsd",
1560 - target_os = "openbsd",
1561 - target_os = "vxworks",
1562 - target_os = "solaris",
1563 - target_os = "illumos",
1564 - target_vendor = "apple",
1565 - ))]
1566 1555 fn get_mode(fd: c_int) -> Option<(bool, bool)> {
1567 1556 let mode = unsafe { libc::fcntl(fd, libc::F_GETFL) };
1568 1557 if mode == -1 {
@@ -1576,22 +1565,6 @@ impl fmt::Debug for File {
1576 1565 }
1577 1566 }
1578 1567
1579 -#[cfg(not(any(
1580 - target_os = "linux",
1581 - target_os = "freebsd",
1582 - target_os = "hurd",
1583 - target_os = "netbsd",
1584 - target_os = "openbsd",
1585 - target_os = "vxworks",
1586 - target_os = "solaris",
1587 - target_os = "illumos",
1588 - target_vendor = "apple",
1589 - )))]
1590 -fn get_mode(_fd: c_int) -> Option<(bool, bool)> {
1591 -// FIXME(#24570): implement this for other Unix platforms
1592 -None
1593 -}
1594 -
1595 1568 let fd = self.as_raw_fd();
1596 1569 let mut b = f.debug_struct("File");
1597 1570 b.field("fd", &fd);