Skip to content

Commit 4260022

Browse files
authored
Merge pull request #431 from frozencemetery/pty
Add UNIX 98 pty functions
2 parents f608f06 + b6dd427 commit 4260022

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/unix/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,11 @@ extern {
833833
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
834834
link_name = "nice$UNIX2003")]
835835
pub fn nice(incr: ::c_int) -> ::c_int;
836+
837+
pub fn grantpt(fd: ::c_int) -> ::c_int;
838+
pub fn posix_openpt(flags: ::c_int) -> ::c_int;
839+
pub fn ptsname(fd: ::c_int) -> *mut ::c_char;
840+
pub fn unlockpt(fd: ::c_int) -> ::c_int;
836841
}
837842

838843
cfg_if! {

src/unix/notbsd/linux/other/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ extern {
563563
pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
564564
pub fn setutxent();
565565
pub fn endutxent();
566+
pub fn getpt() -> ::c_int;
566567
}
567568

568569
#[link(name = "util")]

src/unix/notbsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,9 @@ extern {
851851
flg: ::c_int) -> ::c_int;
852852
pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
853853
abstime: *const ::timespec) -> ::c_int;
854+
pub fn ptsname_r(fd: ::c_int,
855+
buf: *mut ::c_char,
856+
buflen: ::size_t) -> ::c_int;
854857
}
855858

856859
cfg_if! {

0 commit comments

Comments
 (0)