Skip to content

feat: add support for 32 bit time_t in Windows#5010

Open
dybucc wants to merge 1 commit intorust-lang:mainfrom
dybucc:main
Open

feat: add support for 32 bit time_t in Windows#5010
dybucc wants to merge 1 commit intorust-lang:mainfrom
dybucc:main

Conversation

@dybucc
Copy link

@dybucc dybucc commented Mar 11, 2026

Description

This PR adds support symmetric to that offered in some Unix platforms for using 32-bit time_t in Windows. This PR also removes some of the skip() functions used with ctest in Windows, as it renames some symbols to properly reflect whether they are 32-bit or 64-bit compliant, and adds deprecation notices to functions that are not supported by Microsoft anymore (as per their security guidelines.)

There's a few functions with secure variants (suffixed with _s) that are altogether missing and yet do appear in the Windows CRT docs, but that's work for another PR.

In the CI scripts, there seemed to be a slight inconsistency between what the environment variable ARCH, and the environment variable ARCH_BITS were meant to be checked for, so that also got tweaked.

All other changes resulted from running ./ci/style.py, so they're not really part of the PR.

An issue for the deprecation notices hasn't yet been opened, but if the PR seems viable, it can be readily opened before merging.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2026

Some changes occurred in a solarish module

cc @jclulow, @pfmooney

Some changes occurred in an OpenBSD module

cc @semarie

Some changes occurred in a NetBSD-like module

cc @semarie

Some changes occurred in an Android module

cc @maurer

@rustbot rustbot added A-CI Area: CI-related items ctest Issues relating to the ctest crate S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Mar 11, 2026
This commit adds support symmetric to that offered in Linux for using
32-bit `time_t` in Windows. This PR also removes some of the `skip()`
functions in Windows, as it renames some symbols to properly reflect
whether they are 32-bit or 64-bit compliant, and adds deprecation
notices to functions that were are not supported by Microsoft anymore
(as per their security guidelines.)

There's a few functions that are altogether missing and yet do appear in
the Windows CRT docs, but that's work for another PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: CI-related items ctest Issues relating to the ctest crate S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants