The way i read _mingw_stat64.h and sys/stat.h, if _FILE_OFFSET_BITS is
undefined (i.e. autotools is not being used) and the host architecture is
x86_64, we end up with struct stat that has 32-bit st_size field, because
_off_t is always 32-bit, and there's no macro to turn stat into _stat64,
because that macro only gets defined when _FILE_OFFSET_BITS is 64.

GNU docs say that _FILE_OFFSET_BITS should have no effect on 64-bit hosts, but
it is clearly not the case. So either the docs are wrong (i'm too , or
mingw-w64 LFS support is slightly broken. I've tested this on Debian x86_64,
and `struct stat` has 64-bit st_size field, even if _FILE_OFFSET_BITS is 
undefined.

The easiest way to fix this is probably to change sys/stat.h and ensure that
stat() is defined as _stat64 even if _FILE_OFFSET_BITS is undefined (but the
host is 64-bit).

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to