Skip to content

Commit 97f758f

Browse files
kennykerrdjc
authored andcommitted
Update Windows dependencies
1 parent 07a42f9 commit 97f758f

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ wasm-bindgen = { version = "0.2", optional = true }
4949
js-sys = { version = "0.3", optional = true } # contains FFI bindings for the JS Date API
5050

5151
[target.'cfg(windows)'.dependencies]
52-
windows-targets = { version = "0.52", optional = true }
52+
windows-targets = { version = "0.53", optional = true }
5353

5454
[target.'cfg(windows)'.dev-dependencies]
55-
windows-bindgen = { version = "0.58" } # MSRV is 1.70
55+
windows-bindgen = { version = "0.59" } # MSRV is 1.74
5656

5757
[target.'cfg(unix)'.dependencies]
5858
iana-time-zone = { version = "0.1.45", optional = true, features = ["fallback"] }

src/offset/local/win_bindings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, dead_code, clippy::all)]
2+
23
windows_targets::link!("kernel32.dll" "system" fn GetTimeZoneInformationForYear(wyear : u16, pdtzi : *const DYNAMIC_TIME_ZONE_INFORMATION, ptzi : *mut TIME_ZONE_INFORMATION) -> BOOL);
34
windows_targets::link!("kernel32.dll" "system" fn SystemTimeToFileTime(lpsystemtime : *const SYSTEMTIME, lpfiletime : *mut FILETIME) -> BOOL);
45
windows_targets::link!("kernel32.dll" "system" fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lpuniversaltime : *const SYSTEMTIME, lplocaltime : *mut SYSTEMTIME) -> BOOL);
56
windows_targets::link!("kernel32.dll" "system" fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lplocaltime : *const SYSTEMTIME, lpuniversaltime : *mut SYSTEMTIME) -> BOOL);
67
pub type BOOL = i32;
7-
pub type BOOLEAN = u8;
88
#[repr(C)]
99
#[derive(Clone, Copy)]
1010
pub struct DYNAMIC_TIME_ZONE_INFORMATION {
@@ -16,7 +16,7 @@ pub struct DYNAMIC_TIME_ZONE_INFORMATION {
1616
pub DaylightDate: SYSTEMTIME,
1717
pub DaylightBias: i32,
1818
pub TimeZoneKeyName: [u16; 128],
19-
pub DynamicDaylightTimeDisabled: BOOLEAN,
19+
pub DynamicDaylightTimeDisabled: bool,
2020
}
2121
#[repr(C)]
2222
#[derive(Clone, Copy)]

src/offset/local/win_bindings.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--out src/offset/local/win_bindings.rs
2-
--config flatten sys no-bindgen-comment
2+
--flat --sys --no-comment
33
--filter
4-
Windows.Win32.System.Time.GetTimeZoneInformationForYear
5-
Windows.Win32.System.Time.SystemTimeToFileTime
6-
Windows.Win32.System.Time.SystemTimeToTzSpecificLocalTime
7-
Windows.Win32.System.Time.TzSpecificLocalTimeToSystemTime
4+
GetTimeZoneInformationForYear
5+
SystemTimeToFileTime
6+
SystemTimeToTzSpecificLocalTime
7+
TzSpecificLocalTimeToSystemTime

tests/win_bindings.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ fn gen_bindings() {
99
let output = "src/offset/local/win_bindings.rs";
1010
let existing = fs::read_to_string(output).unwrap();
1111

12-
let log = bindgen(["--etc", input]).unwrap();
13-
eprintln!("{}", log);
12+
bindgen(["--etc", input]);
1413

1514
// Check the output is the same as before.
1615
// Depending on the git configuration the file may have been checked out with `\r\n` newlines or

0 commit comments

Comments
 (0)