File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,16 @@ use ansi_term::ANSIString;
8
8
#[ cfg( feature = "color" ) ]
9
9
use libc;
10
10
11
- #[ cfg( feature = "color" ) ]
11
+ #[ cfg( all ( feature = "color" , not ( target_os = "windows" ) ) ) ]
12
12
const STDERR : i32 = libc:: STDERR_FILENO ;
13
- #[ cfg( feature = "color" ) ]
13
+ #[ cfg( all ( feature = "color" , not ( target_os = "windows" ) ) ) ]
14
14
const STDOUT : i32 = libc:: STDOUT_FILENO ;
15
15
16
+ #[ cfg( any( not( feature = "color" ) , target_os = "windows" ) ) ]
17
+ const STDERR : i32 = 0 ;
18
+ #[ cfg( any( not( feature = "color" ) , target_os = "windows" ) ) ]
19
+ const STDOUT : i32 = 0 ;
20
+
16
21
#[ doc( hidden) ]
17
22
#[ derive( Debug , Copy , Clone , PartialEq ) ]
18
23
pub enum ColorWhen {
Original file line number Diff line number Diff line change @@ -407,7 +407,7 @@ extern crate strsim;
407
407
extern crate ansi_term;
408
408
#[ cfg( feature = "yaml" ) ]
409
409
extern crate yaml_rust;
410
- #[ cfg( all ( feature = "wrap_help" , not ( target_os = "windows" ) ) ) ]
410
+ #[ cfg( any ( feature = "wrap_help" , feature = "color" ) ) ]
411
411
extern crate libc;
412
412
#[ cfg( all( feature = "wrap_help" , not( target_os = "windows" ) ) ) ]
413
413
extern crate unicode_width;
You can’t perform that action at this time.
0 commit comments