Skip to content

Drop external configuration for gnu_file_offset_bits64 / RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS #5199

Closed

Description

@tgross35

Currently we have both RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS and RUST_LIBC_UNSTABLE_GNU_TIME_BITS (soon to be replaced with RUSTFLAGS cfg), with the intent that we support all combinations that glibc does on 32-bit platforms:

  • 32-bit time_t, 32-bit off_t (default)
  • 32-bit time_t, 64-bit off_t (#define _FILE_OFFSET_BITS 64)
  • 64-bit time_t, 64-bit off_t ((#define _FILE_OFFSET_BITS 64, #define _TIME_BITS 64)

I don't expect the second option to be very useful to anyone and it's just one more thing to test/support, so I'm leaning toward dropping it before we start telling people they can use these config options. Of course, the internal cfg will stick around since it's helpful for mirroring the glibc source.

Cc @snogge for your thoughts since you authored all of this.

Activity

  1. added
    C-discussionCategory: Discussion or questions that doesn't represent issues with `libc`.
    on Jun 23, 2026
  2. tgross35 commented on Jun 23, 2026

    @tgross35
    MemberAuthor

    If this is done, we should pick up RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS for a little while and emit a warning.

  3. snogge commented on Jun 28, 2026

    @snogge
    Contributor

    Fine by me. I agree that the second option maybe only was useful during the development of the patches.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-discussionCategory: Discussion or questions that doesn't represent issues with `libc`.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions