> My advice would be first to ask the currently active mingw development
> group, namely the mingw64 project [5], whether they plan to add
> "Large File Support" to their header files.
It turns out, the mingw64 headers provide a *partial* "Large File Support".
Namely, for
off_t
<unistd.h> (lseek, ftruncate)
<stdio.h> (fseeko, ftello)
but not for
<sys/stat.h> (stat, fstat)
Witness:
===============================================================================
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
int main ()
{
printf ("off_t is %d-bit\n", 8*sizeof(off_t));
printf ("stat.st_size is %d-bit\n", 8*sizeof(((struct stat *)0)->st_size));
return 0;
}
===============================================================================
$ i686-w64-mingw32-gcc foo.c; ./a.exe
off_t is 32-bit
stat.st_size is 32-bit
$ i686-w64-mingw32-gcc -D_FILE_OFFSET_BITS=64 foo.c; ./a.exe
off_t is 64-bit
stat.st_size is 32-bit
AC_SYS_LARGEFILE detects that sizeof(off_t) is sensitive to _FILE_OFFSET_BITS
and therefore adds "#define _FILE_OFFSET_BITS 64" to config.h.
Bruno