Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update windows-sys 0.52 #1725

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@ log = { version = "0.4.8", optional = true }
libc = "0.2.149"

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.48"
version = "0.52"
features = [
"Win32_Foundation", # Basic types eg HANDLE
"Win32_Networking_WinSock", # winsock2 types/functions
"Win32_Storage_FileSystem", # Enables NtCreateFile
"Win32_System_IO", # IO types like OVERLAPPED etc
"Win32_System_WindowsProgramming", # General future used for various types/funcs
"Wdk_Foundation", # Basic WDK types
"Wdk_Storage_FileSystem", # NT APIs for file system IO
"Wdk_System_IO", # NT APIs for general IO
]

[target.'cfg(target_os = "wasi")'.dependencies]
Expand Down
13 changes: 8 additions & 5 deletions src/sys/windows/afd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ use std::io;
use std::mem::size_of;
use std::os::windows::io::AsRawHandle;

use windows_sys::Wdk::System::IO::NtDeviceIoControlFile;
use windows_sys::Win32::Foundation::{
RtlNtStatusToDosError, HANDLE, NTSTATUS, STATUS_NOT_FOUND, STATUS_PENDING, STATUS_SUCCESS,
};
use windows_sys::Win32::System::WindowsProgramming::{
NtDeviceIoControlFile, IO_STATUS_BLOCK, IO_STATUS_BLOCK_0,
};
use windows_sys::Win32::System::IO::{IO_STATUS_BLOCK, IO_STATUS_BLOCK_0};

const IOCTL_AFD_POLL: u32 = 0x00012024;

Expand Down Expand Up @@ -136,9 +135,13 @@ cfg_io_source! {
use windows_sys::Win32::{
Foundation::{UNICODE_STRING, INVALID_HANDLE_VALUE},
System::WindowsProgramming::{
OBJECT_ATTRIBUTES, FILE_SKIP_SET_EVENT_ON_HANDLE,
FILE_SKIP_SET_EVENT_ON_HANDLE,
},
Storage::FileSystem::{FILE_OPEN, NtCreateFile, SetFileCompletionNotificationModes, SYNCHRONIZE, FILE_SHARE_READ, FILE_SHARE_WRITE},
Storage::FileSystem::{SetFileCompletionNotificationModes, SYNCHRONIZE, FILE_SHARE_READ, FILE_SHARE_WRITE},
};
use windows_sys::Wdk::{
Foundation::OBJECT_ATTRIBUTES,
Storage::FileSystem::{NtCreateFile, FILE_OPEN}
};

const AFD_HELPER_ATTRIBUTES: OBJECT_ATTRIBUTES = OBJECT_ATTRIBUTES {
Expand Down
4 changes: 2 additions & 2 deletions src/sys/windows/io_status_block.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use std::fmt;
use std::ops::{Deref, DerefMut};

use windows_sys::Win32::System::WindowsProgramming::IO_STATUS_BLOCK;
use windows_sys::Win32::System::IO::IO_STATUS_BLOCK;

pub struct IoStatusBlock(IO_STATUS_BLOCK);

cfg_io_source! {
use windows_sys::Win32::System::WindowsProgramming::{IO_STATUS_BLOCK_0};
use windows_sys::Win32::System::IO::{IO_STATUS_BLOCK_0};

impl IoStatusBlock {
pub fn zeroed() -> Self {
Expand Down