From 5b42999a3d3816cbe217a4eeb62415add5b2c23c Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Mon, 5 Sep 2016 21:02:08 -0400 Subject: [PATCH] windows, take 3 --- appveyor.yml | 3 ++- src/sys.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 45b9f0e..7bbd72a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,8 @@ test_script: before_deploy: # Generate artifacts for release - - RUSTFLAGS="-C target-feature=+ssse3" cargo build --release --features simd-accel + - SET RUSTFLAGS="-C target-feature=+ssse3" + - cargo build --release --features simd-accel - mkdir staging # TODO update this part to copy the artifacts that make sense for your project - copy target\release\xrep.exe staging diff --git a/src/sys.rs b/src/sys.rs index 838f354..15205cc 100644 --- a/src/sys.rs +++ b/src/sys.rs @@ -37,6 +37,6 @@ pub fn stdout_is_atty() -> bool { unsafe { let fd = winapi::winbase::STD_OUTPUT_HANDLE; let mut out = 0; - kernel32::GetConsoleMode(handle, &mut out) != 0 + kernel32::GetConsoleMode(kernel32::GetStdHandle(fd), &mut out) != 0 } }