Closed basicmaster closed 5 years ago
Yes. This conversion specifier is part of the C language itself and therefore platform-independent. See the z
column/u
row combination in the big table at https://en.cppreference.com/w/c/io/fprintf referring to size_t
.
skypeweb_contacts.c:619:2: error: unknown conversion type character 'z' in format [-Werror=format] skypeweb_contacts.c:619:2: error: unknown conversion type character 'z' in format [-Werror=format]
Using G_GSIZE_FORMAT instead seems to work better for me on win32, does that work on Linux?
Hmm...what compiler (version) do you use? According to the docs, z
requires at least C99. Maybe it has to be enabled explicitely.
I haven't tried G_GSIZE_FORMAT
, but also if it worked, it may be by chance only - in contrast to the platform-agnostic z
.
Ah, mingw32 is only c89
Have you considered moving to MinGW64 (in contrast to its name, it is available for 32 and 64 bit)?? I guess this won't be the last time that issues occur due to only C89 support ;-)
Pidgin 2.x is still built with minw32 so for now we'll stick with it :)
OK, I see :-)
So a workaround is required to address this limitation. I just added it the code. On Linux, it works as expected, without warnings.
@EionRobb Is there any update here in the meantime?
Sorry for the delay merging this :(
Thanks for the contribution!
Is
%zu
valid on win32?