Skip to content

Commit

Permalink
Merge pull request #431 from frozencemetery/pty
Browse files Browse the repository at this point in the history
Add UNIX 98 pty functions
  • Loading branch information
alexcrichton authored Oct 19, 2016
2 parents f608f06 + b6dd427 commit 4260022
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,11 @@ extern {
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
link_name = "nice$UNIX2003")]
pub fn nice(incr: ::c_int) -> ::c_int;

pub fn grantpt(fd: ::c_int) -> ::c_int;
pub fn posix_openpt(flags: ::c_int) -> ::c_int;
pub fn ptsname(fd: ::c_int) -> *mut ::c_char;
pub fn unlockpt(fd: ::c_int) -> ::c_int;
}

cfg_if! {
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/other/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ extern {
pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
pub fn setutxent();
pub fn endutxent();
pub fn getpt() -> ::c_int;
}

#[link(name = "util")]
Expand Down
3 changes: 3 additions & 0 deletions src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,9 @@ extern {
flg: ::c_int) -> ::c_int;
pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
abstime: *const ::timespec) -> ::c_int;
pub fn ptsname_r(fd: ::c_int,
buf: *mut ::c_char,
buflen: ::size_t) -> ::c_int;
}

cfg_if! {
Expand Down

0 comments on commit 4260022

Please sign in to comment.