Skip to content

Commit

Permalink
Update to windows-sys 0.48. (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Apr 6, 2023
1 parent 99a2a9e commit 62f96e2
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ rustix = { version = "0.37.0", features = ["fs"] }
nt_version = "0.1.3"

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.45.0"
version = "0.48.0"
features = [
"Win32_Storage_FileSystem",
"Win32_Foundation",
Expand Down
2 changes: 1 addition & 1 deletion cap-directories/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ directories-next = "2.0.0"
rustix = { version = "0.37.0" }

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.45.0"
version = "0.48.0"
features = [
"Win32_Foundation",
]
2 changes: 1 addition & 1 deletion cap-fs-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ std = ["cap-std"]
#async_std_arf_strings = ["cap-async-std/arf_strings", "async_std_fs_utf8", "arf-strings"]

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.45.0"
version = "0.48.0"
features = [
"Win32_Storage_FileSystem",
]
Expand Down
3 changes: 1 addition & 2 deletions cap-primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ rustix = { version = "0.37.0", features = ["fs", "process", "procfs", "termios",
winx = "0.35.0"

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.45.0"
version = "0.48.0"
features = [
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_Kernel",
"Win32_System_SystemServices",
"Win32_System_WindowsProgramming",
]
10 changes: 5 additions & 5 deletions cap-primitives/src/windows/fs/create_file_at_w.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ use std::os::windows::io::HandleOrInvalid;
use std::ptr::null_mut;
use windows_sys::Win32::Foundation::{
RtlNtStatusToDosError, SetLastError, ERROR_ALREADY_EXISTS, ERROR_FILE_EXISTS,
ERROR_INVALID_NAME, ERROR_INVALID_PARAMETER, ERROR_NOT_SUPPORTED, HANDLE, INVALID_HANDLE_VALUE,
STATUS_OBJECT_NAME_COLLISION, STATUS_PENDING, STATUS_SUCCESS, SUCCESS, UNICODE_STRING,
ERROR_INVALID_NAME, ERROR_INVALID_PARAMETER, ERROR_NOT_SUPPORTED, GENERIC_ALL, GENERIC_READ,
GENERIC_WRITE, HANDLE, INVALID_HANDLE_VALUE, STATUS_OBJECT_NAME_COLLISION, STATUS_PENDING,
STATUS_SUCCESS, SUCCESS, UNICODE_STRING,
};
use windows_sys::Win32::Security::{
SECURITY_ATTRIBUTES, SECURITY_DYNAMIC_TRACKING, SECURITY_QUALITY_OF_SERVICE,
SECURITY_STATIC_TRACKING,
};
use windows_sys::Win32::Storage::FileSystem::{
NtCreateFile, CREATE_ALWAYS, CREATE_NEW, DELETE, FILE_ACCESS_FLAGS, FILE_ATTRIBUTE_ARCHIVE,
NtCreateFile, CREATE_ALWAYS, CREATE_NEW, DELETE, FILE_ATTRIBUTE_ARCHIVE,
FILE_ATTRIBUTE_COMPRESSED, FILE_ATTRIBUTE_DEVICE, FILE_ATTRIBUTE_DIRECTORY, FILE_ATTRIBUTE_EA,
FILE_ATTRIBUTE_ENCRYPTED, FILE_ATTRIBUTE_HIDDEN, FILE_ATTRIBUTE_INTEGRITY_STREAM,
FILE_ATTRIBUTE_NORMAL, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, FILE_ATTRIBUTE_NO_SCRUB_DATA,
Expand All @@ -31,7 +32,6 @@ use windows_sys::Win32::Storage::FileSystem::{
SECURITY_EFFECTIVE_ONLY, SECURITY_SQOS_PRESENT, SYNCHRONIZE, TRUNCATE_EXISTING,
};
use windows_sys::Win32::System::Kernel::{OBJ_CASE_INSENSITIVE, OBJ_INHERIT};
use windows_sys::Win32::System::SystemServices::{GENERIC_ALL, GENERIC_READ, GENERIC_WRITE};
use windows_sys::Win32::System::WindowsProgramming::{
FILE_DELETE_ON_CLOSE, FILE_NON_DIRECTORY_FILE, FILE_NO_INTERMEDIATE_BUFFERING, FILE_OPENED,
FILE_OPEN_FOR_BACKUP_INTENT, FILE_OPEN_NO_RECALL, FILE_OPEN_REMOTE_INSTANCE,
Expand Down Expand Up @@ -74,7 +74,7 @@ const FILE_ATTRIBUTE_VALID_FLAGS: FILE_FLAGS_AND_ATTRIBUTES = FILE_ATTRIBUTE_EA
pub unsafe fn CreateFileAtW(
dir: HANDLE,
lpfilename: &[u16],
dwdesiredaccess: FILE_ACCESS_FLAGS,
dwdesiredaccess: u32,
dwsharemode: FILE_SHARE_MODE,
lpsecurityattributes: *const SECURITY_ATTRIBUTES,
dwcreationdisposition: FILE_CREATION_DISPOSITION,
Expand Down
3 changes: 1 addition & 2 deletions cap-primitives/src/windows/fs/open_options_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
use crate::fs::OpenOptions;
use std::io;
use std::ptr::null_mut;
use windows_sys::Win32::Foundation::ERROR_INVALID_PARAMETER;
use windows_sys::Win32::Foundation::{ERROR_INVALID_PARAMETER, GENERIC_READ, GENERIC_WRITE};
use windows_sys::Win32::Security::SECURITY_ATTRIBUTES;
use windows_sys::Win32::Storage::FileSystem::{
CREATE_ALWAYS, CREATE_NEW, FILE_FLAG_OPEN_REPARSE_POINT, FILE_GENERIC_WRITE, FILE_SHARE_DELETE,
FILE_SHARE_READ, FILE_SHARE_WRITE, FILE_WRITE_DATA, OPEN_ALWAYS, OPEN_EXISTING,
SECURITY_SQOS_PRESENT, TRUNCATE_EXISTING,
};
use windows_sys::Win32::System::SystemServices::{GENERIC_READ, GENERIC_WRITE};

#[derive(Debug, Clone)]
pub(crate) struct OpenOptionsExt {
Expand Down
2 changes: 1 addition & 1 deletion cap-primitives/src/windows/fs/reopen_impl.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use crate::fs::{get_access_mode, get_flags_and_attributes, OpenOptions};
use io_lifetimes::AsHandle;
use std::{fs, io};
use windows_sys::Win32::Foundation::{GENERIC_READ, GENERIC_WRITE};
use windows_sys::Win32::Storage::FileSystem::{
FILE_FLAG_DELETE_ON_CLOSE, FILE_FLAG_WRITE_THROUGH, FILE_GENERIC_READ, FILE_GENERIC_WRITE,
SECURITY_CONTEXT_TRACKING, SECURITY_DELEGATION, SECURITY_EFFECTIVE_ONLY,
SECURITY_IDENTIFICATION, SECURITY_IMPERSONATION,
};
use windows_sys::Win32::System::SystemServices::{GENERIC_READ, GENERIC_WRITE};
use winx::file::{AccessMode, Flags, ShareMode};

/// Implementation of `reopen`.
Expand Down
2 changes: 1 addition & 1 deletion cap-tempfile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ rand = "0.8.1"
rustix = { version = "0.37.0", features = ["procfs"] }

[target.'cfg(windows)'.dev-dependencies.windows-sys]
version = "0.45.0"
version = "0.48.0"
features = [
"Win32_Foundation",
]
Expand Down

0 comments on commit 62f96e2

Please sign in to comment.