Skip to content

Commit

Permalink
Auto merge of rust-lang#293 - SShrike:freebsd-ioctl-constants, r=alex…
Browse files Browse the repository at this point in the history
…crichton

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.
  • Loading branch information
bors committed May 19, 2016
2 parents fb5008c + ae72fc7 commit e886937
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,9 @@ pub const LOG_SECURITY: ::c_int = 13 << 3;
pub const LOG_CONSOLE: ::c_int = 14 << 3;
pub const LOG_NFACILITIES: ::c_int = 24;

pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
pub const TIOCSWINSZ: ::c_ulong = 0x80087467;

#[link(name = "util")]
extern {
pub fn getnameinfo(sa: *const ::sockaddr,
Expand Down

0 comments on commit e886937

Please sign in to comment.