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
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
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.
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