Skip to content

Commit ce6d57d

Browse files
committed
---
yaml --- r: 95998 b: refs/heads/dist-snap c: 0df8b00 h: refs/heads/master v: v3
1 parent e7eb614 commit ce6d57d

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 1bdaea827ed957ce404fffee27923e9606584ce0
9+
refs/heads/dist-snap: 0df8b0057c8beaf108dfb34e53829b74fd2a7abc
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustuv/tty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl RtioTTY for TtyWatcher {
8888
}
8989

9090
fn isatty(&self) -> bool {
91-
unsafe { uvll::uv_guess_handle(self.fd) == uvll::UV_TTY }
91+
unsafe { uvll::guess_handle(self.fd) == uvll::UV_TTY as libc::c_int }
9292
}
9393
}
9494

branches/dist-snap/src/librustuv/uvll.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,11 @@ pub unsafe fn populate_stat(req_in: *uv_fs_t, stat_out: *uv_stat_t) {
671671

672672
rust_uv_populate_uv_stat(req_in, stat_out)
673673
}
674+
pub unsafe fn guess_handle(handle: c_int) -> c_int {
675+
#[fixed_stack_segment]; #[inline(never)];
676+
677+
rust_uv_guess_handle(handle)
678+
}
674679

675680

676681
// uv_support is the result of compiling rust_uv.cpp
@@ -728,6 +733,7 @@ extern {
728733
fn rust_set_stdio_container_stream(c: *uv_stdio_container_t,
729734
stream: *uv_stream_t);
730735
fn rust_uv_process_pid(p: *uv_process_t) -> c_int;
736+
fn rust_uv_guess_handle(fd: c_int) -> c_int;
731737
}
732738

733739
// generic uv functions
@@ -861,7 +867,6 @@ externfn!(fn uv_tty_init(l: *uv_loop_t, tty: *uv_tty_t, fd: c_int,
861867
externfn!(fn uv_tty_set_mode(tty: *uv_tty_t, mode: c_int) -> c_int)
862868
externfn!(fn uv_tty_get_winsize(tty: *uv_tty_t, width: *c_int,
863869
height: *c_int) -> c_int)
864-
externfn!(fn uv_guess_handle(fd: c_int) -> uv_handle_type)
865870

866871
// signals
867872
externfn!(fn uv_signal_init(loop_: *uv_loop_t, handle: *uv_signal_t) -> c_int)

branches/dist-snap/src/rt/rust_uv.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,3 +334,8 @@ extern "C" int
334334
rust_uv_process_pid(uv_process_t* p) {
335335
return p->pid;
336336
}
337+
338+
extern "C" int
339+
rust_uv_guess_handle(int fd) {
340+
return uv_guess_handle(fd);
341+
}

0 commit comments

Comments
 (0)