apple: Add openpty(3) and forkpty(3)
This commit is contained in:
parent
b47bc673ba
commit
89a7700e23
@ -121,6 +121,7 @@ fn main() {
|
||||
cfg.header("mach-o/dyld.h");
|
||||
cfg.header("mach/mach_time.h");
|
||||
cfg.header("malloc/malloc.h");
|
||||
cfg.header("util.h");
|
||||
if target.starts_with("x86") {
|
||||
cfg.header("crt_externs.h");
|
||||
}
|
||||
|
@ -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! {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user