File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,15 @@ unix = [
39
39
" generic"
40
40
]
41
41
windows = [" generic" ]
42
+ windows_legacy = [
43
+ " arch" ,
44
+ " nproc" ,
45
+ " sync" ,
46
+ " touch" ,
47
+ " whoami" ,
48
+
49
+ " redox_generic"
50
+ ]
42
51
# Feature "fuchsia" contains the exclusive list of utilities
43
52
# that can be compiled and run on Fuchsia. Should be built
44
53
# with --no-default-features when selecting this feature.
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ pub fn main() {
16
16
if val == "1" && key. starts_with ( feature_prefix) {
17
17
let krate = key[ feature_prefix. len ( ) ..] . to_lowercase ( ) ;
18
18
match krate. as_ref ( ) {
19
- "default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" | "windows"
19
+ "default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" | "windows" | "windows_legacy"
20
20
| "nightly" | "test_unimplemented" => continue ,
21
21
_ => { }
22
22
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ extern crate kernel32;
29
29
#[ cfg( windows) ]
30
30
use kernel32:: GetFileInformationByHandle ;
31
31
#[ cfg( windows) ]
32
- use kernel32:: CreateFile2 ;
32
+ use kernel32:: CreateFileW ;
33
33
#[ cfg( windows) ]
34
34
extern crate winapi;
35
35
@@ -731,10 +731,12 @@ fn preserve_hardlinks(
731
731
#[ cfg( windows) ]
732
732
{
733
733
let stat = mem:: uninitialized ( ) ;
734
- let handle = CreateFile2 (
734
+ let handle = CreateFileW (
735
735
src_path. as_ptr ( ) as * const u16 ,
736
736
winapi:: um:: winnt:: GENERIC_READ ,
737
737
winapi:: um:: winnt:: FILE_SHARE_READ ,
738
+ std:: ptr:: null_mut ( ) ,
739
+ 0 ,
738
740
0 ,
739
741
std:: ptr:: null_mut ( ) ,
740
742
) ;
You can’t perform that action at this time.
0 commit comments