mirror of https://github.com/sharkdp/fd.git
Make it work on Windows
This commit is contained in:
parent
1dfd444c9b
commit
80559a91bb
|
@ -80,7 +80,6 @@ dependencies = [
|
|||
"ctrlc 3.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ignore 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -46,8 +46,7 @@ ctrlc = "3.0"
|
|||
libc = "0.2"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
kernel32-sys = "0.2"
|
||||
winapi = "0.3"
|
||||
winapi = { version = "0.3", features = ["handleapi", "consoleapi", "processenv"] }
|
||||
|
||||
[dev-dependencies]
|
||||
diff = "0.1"
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
// notice may not be copied, modified, or distributed except
|
||||
// according to those terms.
|
||||
|
||||
extern crate kernel32;
|
||||
extern crate winapi;
|
||||
|
||||
use self::kernel32::{GetStdHandle, GetConsoleMode, SetConsoleMode};
|
||||
use self::winapi::{STD_OUTPUT_HANDLE, INVALID_HANDLE_VALUE};
|
||||
use self::winapi::um::processenv::GetStdHandle;
|
||||
use self::winapi::um::consoleapi::{GetConsoleMode, SetConsoleMode};
|
||||
use self::winapi::um::winbase::STD_OUTPUT_HANDLE;
|
||||
use self::winapi::um::handleapi::INVALID_HANDLE_VALUE;
|
||||
|
||||
const ENABLE_VIRTUAL_TERMINAL_PROCESSING: u32 = 0x0004;
|
||||
|
||||
|
|
Loading…
Reference in New Issue