> the mingw64 headers provide a partial "Large File Support".
> Namely, for
> off_t
> <unistd.h> (lseek, ftruncate)
> <stdio.h> (fseeko, ftello)
And even this partial support is only partially working.
They define a function ftruncate64, and "#define ftruncate ftruncate64".
This function
1) violates POSIX:
test-ftruncate.c:38: assertion failed
FAIL: test-ftruncate.sh
2) is written in a way that may erase the file that is to be extended.
See
http://mingw-w64.sourcearchive.com/documentation/2.0-1/ftruncate64_8c_source.html
the comment "truncating more than the allowed space results
in file getting mysteriously deleted".
Bruno