Skip to content

Commit e886937

Browse files
committed
Auto merge of rust-lang#293 - SShrike:freebsd-ioctl-constants, r=alexcrichton
Add the TIOCGWINSZ and TIOCSWINSZ constants I've added the `TIOCGWINSZ` and `TIOCSWINSZ` constants/ioctl control codes. I wasn't quite sure where to put them, so hopefully they're in the right place. As of now it's set to compile on 'FreeBSD-like' platforms, so it will compile on both FreeBSD *and* DragonflyBSD. I've only tested it on FreeBSD though, but it should also work on DragonflyBSD AFAIK. Fixes rust-lang#292.
2 parents fb5008c + ae72fc7 commit e886937

File tree

1 file changed

+3
-0
lines changed
  • src/unix/bsd/freebsdlike

1 file changed

+3
-0
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,9 @@ pub const LOG_SECURITY: ::c_int = 13 << 3;
668668
pub const LOG_CONSOLE: ::c_int = 14 << 3;
669669
pub const LOG_NFACILITIES: ::c_int = 24;
670670

671+
pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
672+
pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
673+
671674
#[link(name = "util")]
672675
extern {
673676
pub fn getnameinfo(sa: *const ::sockaddr,

0 commit comments

Comments
 (0)