Re: [Mingw-w64-public] 32-bit off_t on x86_64

2018-08-04 Thread LRN
On 04.08.2018 23:50, Gisle Vanem wrote: > LRN wrote: > >> We've got a complaint about crashes when using g_stat() in glib. Debugging >> showed that sizeof stat.st_size == 4 in user application, but sizeof stat >> st_size == 8 in glib. >> >> Turns out, MinGW-w64 defines 'off_t' (the type of st_size

Re: [Mingw-w64-public] 32-bit off_t on x86_64

2018-08-04 Thread Gisle Vanem
LRN wrote: We've got a complaint about crashes when using g_stat() in glib. Debugging showed that sizeof stat.st_size == 4 in user application, but sizeof stat st_size == 8 in glib. Turns out, MinGW-w64 defines 'off_t' (the type of st_size) as a synonym for 'long', and 'long' is always[1] 32-bi

[Mingw-w64-public] 32-bit off_t on x86_64

2018-08-04 Thread LRN
We've got a complaint about crashes when using g_stat() in glib. Debugging showed that sizeof stat.st_size == 4 in user application, but sizeof stat st_size == 8 in glib. Turns out, MinGW-w64 defines 'off_t' (the type of st_size) as a synonym for 'long', and 'long' is always[1] 32-bit on Windows.

Re: [Mingw-w64-public] [PATCH] [RFC] headers: Skip the mingw specific stdio functions if ucrt is used

2018-08-04 Thread Martin Storsjö
On Sat, 4 Aug 2018, Liu Hao wrote: 在 2018/8/4 5:12, Martin Storsjö 写道: In these cases, the default ucrt functions already are C99 compatible, so even if the caller has requested to use the mingw version, by defining __USE_MINGW_ANSI_STDIO, the ucrt version should be fine. Or does there exit