aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/tty
diff options
context:
space:
mode:
authorMateusz MikuĊ‚a <mati865@users.noreply.github.com>2020-09-01 00:30:45 +0200
committerGitHub <noreply@github.com>2020-08-31 22:30:45 +0000
commit5ee7ae8a274fcc58754aa5a91a14b1dedbb87583 (patch)
tree7d122c18517b119d8a4b3b99c337df4b889e5682 /alacritty_terminal/src/tty
parentb39c791649e6d7409ad287741cfef962738c0fd4 (diff)
downloadalacritty-5ee7ae8a274fcc58754aa5a91a14b1dedbb87583.tar.gz
alacritty-5ee7ae8a274fcc58754aa5a91a14b1dedbb87583.zip
Disable WinPTY with windows-gnu toolchain
Co-authored-by: Christian Duerr <contact@christianduerr.com>
Diffstat (limited to 'alacritty_terminal/src/tty')
-rw-r--r--alacritty_terminal/src/tty/windows/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/alacritty_terminal/src/tty/windows/mod.rs b/alacritty_terminal/src/tty/windows/mod.rs
index 039dbaa6..27b65e58 100644
--- a/alacritty_terminal/src/tty/windows/mod.rs
+++ b/alacritty_terminal/src/tty/windows/mod.rs
@@ -10,19 +10,19 @@ use crate::term::SizeInfo;
use crate::tty::windows::child::ChildExitWatcher;
use crate::tty::{ChildEvent, EventedPty, EventedReadWrite};
-#[cfg(feature = "winpty")]
+#[cfg(all(feature = "winpty", target_env = "msvc"))]
mod automatic_backend;
mod child;
mod conpty;
-#[cfg(feature = "winpty")]
+#[cfg(all(feature = "winpty", target_env = "msvc"))]
mod winpty;
-#[cfg(not(feature = "winpty"))]
+#[cfg(not(all(feature = "winpty", target_env = "msvc")))]
use conpty::Conpty as Backend;
-#[cfg(not(feature = "winpty"))]
+#[cfg(not(all(feature = "winpty", target_env = "msvc")))]
use mio_anonymous_pipes::{EventedAnonRead as ReadPipe, EventedAnonWrite as WritePipe};
-#[cfg(feature = "winpty")]
+#[cfg(all(feature = "winpty", target_env = "msvc"))]
use automatic_backend::{
EventedReadablePipe as ReadPipe, EventedWritablePipe as WritePipe, PtyBackend as Backend,
};
@@ -39,12 +39,12 @@ pub struct Pty {
child_watcher: ChildExitWatcher,
}
-#[cfg(not(feature = "winpty"))]
+#[cfg(not(all(feature = "winpty", target_env = "msvc")))]
pub fn new<C>(config: &Config<C>, size: &SizeInfo, window_id: Option<usize>) -> Pty {
conpty::new(config, size, window_id).expect("Failed to create ConPTY backend")
}
-#[cfg(feature = "winpty")]
+#[cfg(all(feature = "winpty", target_env = "msvc"))]
pub fn new<C>(config: &Config<C>, size: &SizeInfo, window_id: Option<usize>) -> Pty {
automatic_backend::new(config, size, window_id)
}