Skip to content

Commit 20c1bdc

Browse files
committed
Add terminal ioctls
1 parent 06660e1 commit 20c1bdc

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/unix/redox/mod.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,18 @@ pub const EXIT_FAILURE: ::c_int = 1;
400400

401401
// sys/ioctl.h
402402
// TODO: relibc {
403-
pub const FIONBIO: ::c_int = 0x5421;
404-
pub const FIOCLEX: ::c_int = 0x5451;
403+
pub const FIONBIO: ::c_ulong = 0x5421;
404+
pub const FIOCLEX: ::c_ulong = 0x5451;
405405
// }
406+
pub const TCGETS: ::c_ulong = 0x5401;
407+
pub const TCSETS: ::c_ulong = 0x5402;
408+
pub const TCFLSH: ::c_ulong = 0x540B;
409+
pub const TIOCGPGRP: ::c_ulong = 0x540F;
410+
pub const TIOCSPGRP: ::c_ulong = 0x5410;
411+
pub const TIOCGWINSZ: ::c_ulong = 0x5413;
412+
pub const TIOCSWINSZ: ::c_ulong = 0x5414;
406413
extern {
407-
pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
414+
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
408415
}
409416

410417
// sys/select.h

0 commit comments

Comments
 (0)