Skip to content

Commit 07216ae

Browse files
committed
Upgrade to windows-bindgen 0.60
1 parent bf1973c commit 07216ae

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ name = "chrono"
2121
default = ["clock", "std", "oldtime", "wasmbind"]
2222
alloc = []
2323
libc = []
24-
winapi = ["windows-targets"]
24+
winapi = ["windows-link"]
2525
std = ["alloc"]
2626
clock = ["winapi", "iana-time-zone", "android-tzdata", "now"]
2727
now = ["std"]
@@ -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.53", optional = true }
52+
windows-link = { version = "0.1", optional = true }
5353

5454
[target.'cfg(windows)'.dev-dependencies]
55-
windows-bindgen = { version = "0.59" } # MSRV is 1.74
55+
windows-bindgen = { version = "0.60" } # 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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![allow(non_snake_case, non_upper_case_globals, non_camel_case_types, dead_code, clippy::all)]
22

3-
windows_targets::link!("kernel32.dll" "system" fn GetTimeZoneInformationForYear(wyear : u16, pdtzi : *const DYNAMIC_TIME_ZONE_INFORMATION, ptzi : *mut TIME_ZONE_INFORMATION) -> BOOL);
4-
windows_targets::link!("kernel32.dll" "system" fn SystemTimeToFileTime(lpsystemtime : *const SYSTEMTIME, lpfiletime : *mut FILETIME) -> BOOL);
5-
windows_targets::link!("kernel32.dll" "system" fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lpuniversaltime : *const SYSTEMTIME, lplocaltime : *mut SYSTEMTIME) -> BOOL);
6-
windows_targets::link!("kernel32.dll" "system" fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lplocaltime : *const SYSTEMTIME, lpuniversaltime : *mut SYSTEMTIME) -> BOOL);
3+
windows_link::link!("kernel32.dll" "system" fn GetTimeZoneInformationForYear(wyear : u16, pdtzi : *const DYNAMIC_TIME_ZONE_INFORMATION, ptzi : *mut TIME_ZONE_INFORMATION) -> BOOL);
4+
windows_link::link!("kernel32.dll" "system" fn SystemTimeToFileTime(lpsystemtime : *const SYSTEMTIME, lpfiletime : *mut FILETIME) -> BOOL);
5+
windows_link::link!("kernel32.dll" "system" fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lpuniversaltime : *const SYSTEMTIME, lplocaltime : *mut SYSTEMTIME) -> BOOL);
6+
windows_link::link!("kernel32.dll" "system" fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lplocaltime : *const SYSTEMTIME, lpuniversaltime : *mut SYSTEMTIME) -> BOOL);
77
pub type BOOL = i32;
88
#[repr(C)]
99
#[derive(Clone, Copy)]

tests/win_bindings.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +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-
bindgen(["--etc", input]);
12+
bindgen(["--no-deps", "--etc", input]);
1313

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

0 commit comments

Comments
 (0)