Repository navigation
1.0: Remove lfs64 API (open64 and similar) #4805
Description
Activity
Clarifying what exactly I think we should do here: I don't think we should deprecate just yet.
libcis going to go through stages that users are going to follow:- 64-bit off_t/time_t is not universally present on 32-bit platforms
- 64-bit off_t/time_t is available behind an unstable cfg (we're pretty much here now)
- 64-bit off_t/time_t is available behind a stable cfg
- 1.0, only 64-bit off_t/time_t on all platforms by default
If we start deprecating API before users have a stable cfg, that seems extremely likely to cause user confusion because if you're using code like this:
#[cfg(env = "glibc", bits = "32")] use libc::open64 as open;
and would like to start testing with
libc_unstable_gnu_time_bits = "64", then how do you avoid deprecation warnings while getting the correct behavior? If you importlibc::openthen your library may stop working iflibc_unstable_gnu_time_bitsis unset. If you cfg your import onlibc_unstable_gnu_time_bits = "64", you're going to get surprised when that cfg gets renamed to something without_unstable. The fact of the matter is that seeing a name likeopen64currently means you know that you are 64-bit safe regardless of platform, and I don't want to start making that ambiguous without a clear path forward.So, what to do:
At this time I think we should identify everything we want to deprecate without actually deprecating it yet. E.g.:
// FIXME(1.0,deprecate): lfs64 binding to be removed fn open64(...);
That way we can still get things in piecemeal without flipping the switch just yet. Once we're past step 3 we can easily find+replace to actually deprecate them, and right before step 4 we delete everything that's deprecated.
To be clear: this mostly refers to targets where we need some form of config that can be toggled. If
open64never existed on the platform then I'm a bit more open to deprecating now on less popular targets, though this is still going to be case-by-case because I'd still like it if users only need to update their imports once. With dependencies in the tens of thousands, little bits of churn add up :)- added 5 commits that reference this issue
on Jul 9, 2026 - added a commit that references this issue
on Aug 10, 2026 - added 2 commits that reference this issue
on Aug 10, 2026 - added 9 commits that reference this issue
on Aug 31, 2026
With 1.0 we will default to 64-bit
time_tandoff_t, and users will need to opt in to 32-bit versions of these APIs - if we expose them at all. This means the API likeopen64will be redundant withopen. There isn't a reason to use both unless a user opts in to 32-bitoff_tbut occasionally needs to use 64-bit operations: this doesn't sound like a usecase worth supporting. They also aren't posix.To back this up, it sounds like musl would deprecate them if they could.