Skip to content

Look at doing the equivalent of #define _FILE_OFFSET_BITS 64 on windows-gnu #5181

Description

@tgross35

windows-gnu does not seem to set _FILE_OFFSET_BITS 64 by default, but allows it to be set. We may want to make this change in libc for 1.0 (i.e. off_t = i64 and change what the functions link) if there's any chance MinGW changes their default.

I took a look at https://sourceforge.net/p/mingw-w64/bugs/ but didn't see anything.

It's actually kind of a weird setup because time_t is 64 bits on all platforms, but the glibc docs (https://sourceware.org/glibc/manual/latest/html_node/Feature-Test-Macros.html) say:

_TIME_BITS=64 can be defined only when _FILE_OFFSET_BITS=64 is also defined.

Size demo: https://c.godbolt.org/z/47W65PdT1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions