Skip to content

Commit 04c947c

Browse files
committed
Implement winsize() for {ios,dragonfly}
`sys/ttycom.h` in both: `#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */`
1 parent 0b01a9b commit 04c947c

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/libstd/sys/unix/tty.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ pub struct TTY {
2323
}
2424

2525
#[cfg(any(target_os = "macos",
26+
target_os = "ios",
27+
target_os = "dragonfly",
2628
target_os = "freebsd",
2729
target_os = "bitrig",
2830
target_os = "openbsd"))]
@@ -54,12 +56,6 @@ impl TTY {
5456
Err(sys_common::unimpl())
5557
}
5658

57-
#[cfg(any(target_os = "linux",
58-
target_os = "android",
59-
target_os = "macos",
60-
target_os = "freebsd",
61-
target_os = "bitrig",
62-
target_os = "openbsd"))]
6359
pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
6460
unsafe {
6561
#[repr(C)]
@@ -82,10 +78,4 @@ impl TTY {
8278
}
8379
}
8480
}
85-
86-
#[cfg(any(target_os = "ios",
87-
target_os = "dragonfly"))]
88-
pub fn get_winsize(&mut self) -> IoResult<(int, int)> {
89-
Err(sys_common::unimpl())
90-
}
9181
}

0 commit comments

Comments
 (0)