Skip to content

Commit c8dac1e

Browse files
committed
feat: deprecate windows time64_t
Functionality related to the Windows `time64_t` has been deprecated in favor of a single, 64-bit wide `time_t`. This has also required some work into getting rid of the conditional compilation uses of `time_t` on GNU target environments, and tweaking the `max_align_t` type, as that seemed to provide an incoherent interface in Windows with mingw32. During this work, what seems like some incoherences in the CI pipeline where found out, and have been addressed as well. This mostly consists of a step where mingw32 was being installed and possible "fixed" but that would never run because it relied on environment variables that were only visible in the runner once the job coming after the one setting up the Rust toolchain ran. This has now been removed in favor of not performing any checks, as CI logs seem to have been running for some time without this. The FIXME comment on the tier 1 platform support for Windows with GNU has also been removed as no segfaults were observed.
1 parent ff0e616 commit c8dac1e

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

libc-test/build.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,6 @@ fn test_cygwin(target: &str) {
753753
fn test_windows(target: &str) {
754754
assert!(target.contains("windows"));
755755
let gnu = target.contains("gnu");
756-
let i686 = target.contains("i686");
757756

758757
let mut cfg = ctest_cfg();
759758

@@ -818,19 +817,9 @@ fn test_windows(target: &str) {
818817
cfg.skip_alias(move |alias| match alias.ident() {
819818
"SSIZE_T" if !gnu => true,
820819
"ssize_t" if !gnu => true,
821-
// FIXME(windows): The size and alignment of this type are incorrect
822-
"time_t" if gnu && i686 => true,
823820
_ => false,
824821
});
825822

826-
cfg.skip_struct(move |struct_| {
827-
match struct_.ident() {
828-
// FIXME(windows): The size and alignment of this struct are incorrect
829-
"timespec" if gnu && i686 => true,
830-
_ => false,
831-
}
832-
});
833-
834823
cfg.skip_const(move |constant| {
835824
match constant.ident() {
836825
// FIXME(windows): API error:

src/windows/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@ pub type clock_t = i32;
1818

1919
pub type errno_t = c_int;
2020

21-
cfg_if! {
22-
if #[cfg(all(target_arch = "x86", target_env = "gnu"))] {
23-
pub type time_t = i32;
24-
} else {
25-
pub type time_t = i64;
26-
}
27-
}
21+
pub type time_t = i64;
2822

2923
pub type off_t = i32;
3024
pub type dev_t = u32;
@@ -34,6 +28,12 @@ extern_ty! {
3428
pub enum timezone {}
3529
}
3630

31+
#[deprecated(
32+
since = "1.0.0",
33+
note = "This time-related value, among others, is part of the shift \
34+
towards using a single, 64-bit-sized `time_t`. See #PENDING for \
35+
discussion."
36+
)]
3737
pub type time64_t = i64;
3838

3939
pub type SOCKET = crate::uintptr_t;

0 commit comments

Comments
 (0)