aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-04-23 10:36:01 +0100
committerRon Yorston <rmy@pobox.com>2012-04-23 10:44:16 +0100
commit9e26feebb1f6752fa21f4680a744cdc688366be5 (patch)
tree579dac199ef3f83d56933df65e96f116f5f14cca /libbb
parentece4cb7f6debdb741b8a43053aeea817b80f49e7 (diff)
downloadbusybox-w32-9e26feebb1f6752fa21f4680a744cdc688366be5.tar.gz
busybox-w32-9e26feebb1f6752fa21f4680a744cdc688366be5.tar.bz2
busybox-w32-9e26feebb1f6752fa21f4680a744cdc688366be5.zip
win32: implement ioctl
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xfuncs.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index e657820f3..23f27516f 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -262,11 +262,7 @@ int FAST_FUNC get_terminal_width_height(int fd, unsigned *width, unsigned *heigh
262 win.ws_col = 0; 262 win.ws_col = 0;
263 /* I've seen ioctl returning 0, but row/col is (still?) 0. 263 /* I've seen ioctl returning 0, but row/col is (still?) 0.
264 * We treat that as an error too. */ 264 * We treat that as an error too. */
265#if !ENABLE_PLATFORM_MINGW32
266 err = ioctl(fd, TIOCGWINSZ, &win) != 0 || win.ws_row == 0; 265 err = ioctl(fd, TIOCGWINSZ, &win) != 0 || win.ws_row == 0;
267#else
268 err = winansi_get_terminal_width_height(&win) == 0;
269#endif
270 if (height) 266 if (height)
271 *height = wh_helper(win.ws_row, 24, "LINES", &err); 267 *height = wh_helper(win.ws_row, 24, "LINES", &err);
272 if (width) 268 if (width)