gstdio: use _stat64 for GStatBuf on 64bit mingw. Fixes #1476

Christoph Reiter requested to merge mingw-statbuf-size into master

The size of stat depends on various macros on Windows which leads to the problem of size mismatches when glib is built with a different configuration than a program using it.

For example the autotools build defaults to _FILE_OFFSET_BITS=64 and a program not defining _FILE_OFFSET_BITS will allocate a too small struct on the stack, leading to stack corruption when glib writes to it.

To make the size the user sees always match the default mingw build define GStatBuf as _stat64 (same as _FILE_OFFSET_BITS=64) under mingw+64bit.

Edited by Christoph Reiter

Merge request reports