Skip to content

Commit c31907e

Browse files
committed
---
yaml --- r: 91608 b: refs/heads/auto c: 0df8b00 h: refs/heads/master v: v3
1 parent 41a2126 commit c31907e

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
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 1bdaea827ed957ce404fffee27923e9606584ce0
16+
refs/heads/auto: 0df8b0057c8beaf108dfb34e53829b74fd2a7abc
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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/auto/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/auto/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)