Skip to content

emscripten: deprecate file offset types#5142

Open
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:emscripten-largefile64-patch
Open

emscripten: deprecate file offset types#5142
dybucc wants to merge 1 commit into
rust-lang:mainfrom
dybucc:emscripten-largefile64-patch

Conversation

@dybucc

@dybucc dybucc commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Description

This PR deprecates all LFS64 types and routines in emscripten. This target follows quite closely the musl upstream. The changes they make are not concerned with file offset types. The only exception to this is the blkcnt_t type. This type is always 32-bits wide no matter the target machine.

All other types have received the same treatment as in #5170.

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

@dybucc

dybucc commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Style check fails for reasons outside the changes introduced in this PR. The formatting checks seem
to run on a post-macro expanded crate output. When annotating the item produced by the extern_ty
macro with an attribute, this expands with a wrongly indented function block, even though the actual
source code is correctly indented. The output log of the CI job shows this.

@dybucc dybucc force-pushed the emscripten-largefile64-patch branch from 21a8c5d to 9cdfb82 Compare June 4, 2026 14:46
@rustbot

This comment has been minimized.

@dybucc dybucc force-pushed the emscripten-largefile64-patch branch from 9cdfb82 to 4ce5a85 Compare June 9, 2026 07:11
@rustbot

This comment has been minimized.

@tgross35

Copy link
Copy Markdown
Contributor

@rustbot blocked
@SnoozeThis wait 2 months -> remove label S-blocked, add label S-waiting-on-review

Holding off until there is a good alternative to off64_t

@SnoozeThis

Copy link
Copy Markdown

(https://snoozeth.is/FoBvqh9wkR8) I will wait until Wed, 19 Aug 2026 08:32:43 UTC and then add label S-waiting-on-review and remove label S-blocked.

@rustbot claim.

@tgross35

Copy link
Copy Markdown
Contributor

Actually I think I'm missing something - what does this PR fix? I only see it adding deprecation warnings and deleting ino64_t (was that intentional?)

@dybucc

dybucc commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

The ino_t removal was not intentional. PRs are getting frozen because there's yet to be a solution for 32-bit platforms. This should be no issue in emscripten because the unsuffixed types were already fixed-precision 64-bit wide types. Anybody who was using the LFS64 types can switch to the unsuffixed types with no regressions with a nice warning advising them of it.

The PR description got updated with also mentioning that the blkcnt_t type is an exception. Its bit width does not change so that's the same as with the other file offset types. But it is always defined as a 32-bit and not as a 64-bit signed integer.

And then this transitively applies to the affected records that use these types.

@dybucc dybucc force-pushed the emscripten-largefile64-patch branch from 4ce5a85 to 334a733 Compare June 19, 2026 10:35
@rustbot

This comment has been minimized.

@dybucc dybucc force-pushed the emscripten-largefile64-patch branch 2 times, most recently from 145ecb7 to 3dae619 Compare June 20, 2026 15:04
@rustbot

rustbot commented Jun 20, 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.

@dybucc dybucc force-pushed the emscripten-largefile64-patch branch from 3dae619 to a2c64e9 Compare June 20, 2026 15:07
@dybucc dybucc changed the title refactor: fix definition of LFS64-related types in emscripten emscripten: deprecate file offset types Jun 20, 2026
emscripten follows musl quite closely. The changes they make are not
concerned with file offset types. The only exception to this is
`blkcnt_t`. This type is defined as 32-bits wide no matter the target.

All other file offset types are 64-bit wide no matter the target.
@dybucc dybucc force-pushed the emscripten-largefile64-patch branch from a2c64e9 to 3d4a7e2 Compare June 20, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants