mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 17:58:06 +00:00
fix/du ~ update to correct WinAPI usage (fixes #1496)
This commit is contained in:
parent
403a6a3935
commit
251905da3d
2 changed files with 8 additions and 9 deletions
|
@ -22,8 +22,7 @@ uucore = { version="0.0.3", package="uucore", git="https://github.com/uutils/uuc
|
|||
uucore_procs = { version="0.0.3", package="uucore_procs", git="https://github.com/uutils/uucore.git", branch="canary" }
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
kernel32-sys = "0.2"
|
||||
winapi = { version = "0.3", features = ["handleapi", "winerror"] }
|
||||
winapi = { version = "0.3", features = ["errhandlingapi", "fileapi", "handleapi", "winerror"] }
|
||||
|
||||
[[bin]]
|
||||
name = "df"
|
||||
|
|
|
@ -13,16 +13,16 @@ extern crate number_prefix;
|
|||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
||||
#[cfg(windows)]
|
||||
extern crate kernel32;
|
||||
use clap::{App, Arg};
|
||||
|
||||
#[cfg(windows)]
|
||||
extern crate winapi;
|
||||
|
||||
use clap::{App, Arg};
|
||||
#[cfg(windows)]
|
||||
use kernel32::{
|
||||
FindFirstVolumeW, FindNextVolumeW, FindVolumeClose, GetDriveTypeW, GetLastError,
|
||||
GetVolumeInformationW, GetVolumePathNamesForVolumeNameW, QueryDosDeviceW,
|
||||
use winapi::um::errhandlingapi::GetLastError;
|
||||
#[cfg(windows)]
|
||||
use winapi::um::fileapi::{
|
||||
FindFirstVolumeW, FindNextVolumeW, FindVolumeClose, GetDriveTypeW, GetVolumeInformationW,
|
||||
GetVolumePathNamesForVolumeNameW, QueryDosDeviceW,
|
||||
};
|
||||
|
||||
use number_prefix::{binary_prefix, decimal_prefix, PrefixNames, Prefixed, Standalone};
|
||||
|
|
Loading…
Reference in a new issue