summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-05-19 15:02:11 -0700
committerbors <bors@rust-lang.org>2016-05-19 15:02:11 -0700
commite88693700ef25cadbb32f5dff33d3a90dc233fa2 (patch)
tree39f43ba598e76a4f56989cf4506fe6718ef38808
parentfb5008c0aafc345ec9c7befc358c884487f4a29b (diff)
parentae72fc7e43172abbda0b6b5d826db21256a233b4 (diff)
downloadrust-libc-e88693700ef25cadbb32f5dff33d3a90dc233fa2.tar.gz
Auto merge of #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 #292.
-rw-r--r--src/unix/bsd/freebsdlike/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs
index 43181c0a5f..8faebc84be 100644
--- a/src/unix/bsd/freebsdlike/mod.rs
+++ b/src/unix/bsd/freebsdlike/mod.rs
@@ -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,