Skip to content

refactor: change file offset bitwidths in android#5178

Open
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:android-time_t
Open

refactor: change file offset bitwidths in android#5178
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:android-time_t

Conversation

@dybucc

@dybucc dybucc commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

This PR deprecates all LFS64 symbols under Android targets with a 64-bit ABI. This follows from [1], where the Android upstream documentation mentions that these types are simply aliases in such targets, and from the fact the libc crate is actively attempting to provide a single, unsuffixed type with a fixed bit-width.

The linked document mentions as well that unlike other platforms, one does not require the definition of feature test macros such as __LARGEFILE_SOURCE or __LARGEFILE64_SOURCE to be present for the LFS64 symbols to both be exposed and aliased.

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

rustbot commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in an Android module

cc @maurer

@rustbot rustbot added S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Jun 18, 2026
This patch updates the exposed file offset bindings to Android targets.
At present, all target triples provide LFS64 types and routines, even
though it is only on platforms with a 32-bit ABI that this is required.

The Android upstream documentation mentions that these symbols are not
really necessary in platforms with a 64-bit ABI [1]. We currently also
expose those.

Following the trend towards providing a single, 64-bit unsuffixed symbol
in the `libc` crate, this patch deprecates all such symbols. The
deprecation note advises use of the memory-wise equivalent, unsuffixed
types.

[1]: https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md
@rustbot

rustbot commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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