Am 14. November 2024 um 13:31 schrieb "Bruno Haible":
> No, this is not needed. In a testdir of the modules fseeko, ftello, fsync,
> on mingw:
>   - we have REPLACE_FSEEKO=1, hence fseeko.c gets compiled, and it uses
>     the mingw fseeko function,
>   - the two new unit tests pass.
>   - Apparently the mingw fseeko already supports the 64-bit argument fine.

"fseeko" has the following prototype in mingw-w64:
https://sourceforge.net/p/mingw-w64/code/HEAD/tree/trunk/mingw-w64-crt/stdio/fseeko32.c
int fseeko(FILE* stream, _off_t offset, int whence)

The offset is of type "_off_t". That type is defined like this in mingw-w64:
https://sourceforge.net/p/mingw-w64/code/HEAD/tree/trunk/mingw-w64-headers/crt/_mingw_off_t.h
  typedef long _off_t;

"long" is a 32-bit integer on Windows. So, the "fseeko" function from mingw-w64 
shouldn't work for large files.
If the unit test passes with it, it might be passing erroneously.

Does that make sense?

Markus



Reply via email to