crt: Provide emulation of _fstat32i64, _stat32i64 and _wstat32i64 functions

Functions _fstat32i64 (alias of _fstati64), _stat32i64 (alias of _stati64)
and _wstat32i64 (alias of _wstati64) are available since msvcrt40.dll.
These functions returns 64-bit st_size and 32-bit file timestamps.

For pre-msvcrt40 CRT import libraries provides mingw-w64 emulation of those
functions via the _fstat64, _stat64 and _stat64 functions, which returns
both st_size and file timestamps in 64-bit precision.

When timestamp does not fit into the 32-bit field then sets field to invalid
value -1. This is behavior of msvcrt functions with 32-bit time_t fields.

Note that _fstat64, _stat64 and _stat64 functions are available in all CRT
import libraries, in pre-msvcr70 CRT import libraries they are emulated.

Signed-off-by: Martin Storsjö <martin@martin.st>
4 files changed