From 69a98a22b29db824e319cc21f4646dfae5566505 Mon Sep 17 00:00:00 2001 From: jethrogb Date: Mon, 22 Jul 2019 19:12:41 -0700 Subject: [PATCH] Assume no TTY on platforms not explicitly supported --- src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 89b7555..e3dc9ac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,7 +15,7 @@ //! } //! ``` -#![cfg_attr(unix, no_std)] +#![cfg_attr(not(windows), no_std)] #[cfg(unix)] extern crate libc; @@ -141,7 +141,11 @@ unsafe fn msys_tty_on(fd: DWORD) -> bool { } /// returns true if this is a tty -#[cfg(target_arch = "wasm32")] +// This list should have one entry for every platform-specific `is` fn defined above. +#[cfg(all( + not(all(unix, not(target_arch = "wasm32"))), + not(windows), +))] pub fn is(_stream: Stream) -> bool { false }