diff options
Diffstat (limited to 'src/unix')
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 9 | ||||
-rw-r--r-- | src/unix/mod.rs | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 3d96ed9308..ec0fe7c111 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -927,6 +927,15 @@ extern { len: *mut ::off_t, hdtr: *mut ::sf_hdtr, flags: ::c_int) -> ::c_int; + pub fn openpty(amaster: *mut ::c_int, + aslave: *mut ::c_int, + name: *mut ::c_char, + termp: *mut termios, + winp: *mut ::winsize) -> ::c_int; + pub fn forkpty(amaster: *mut ::c_int, + name: *mut ::c_char, + termp: *mut termios, + winp: *mut ::winsize) -> ::pid_t; } cfg_if! { diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 6176402fb0..3ffb3b79cf 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -99,6 +99,13 @@ s! { pub events: ::c_short, pub revents: ::c_short, } + + pub struct winsize { + pub ws_row: ::c_ushort, + pub ws_col: ::c_ushort, + pub ws_xpixel: ::c_ushort, + pub ws_ypixel: ::c_ushort, + } } pub const SIG_DFL: sighandler_t = 0 as sighandler_t; |