]> git.ipfire.org Git - thirdparty/libvirt.git/commit
examples: fix 64-bit integer formatting on Windows
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 2 Apr 2019 08:45:47 +0000 (09:45 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 3 Apr 2019 10:34:25 +0000 (11:34 +0100)
commit11ea62665c0376fb3f3384d5d76166662e7d0240
tree547716af4c3df72bd8af8aa4eb48e260ec78135e
parent86cc922e3195ebc4b4c3dc1ff091d3f6405b8610
examples: fix 64-bit integer formatting on Windows

The Windows printf functions don't support %llu/%lld for printing 64-bit
integers. For most of libvirt this doesn't matter as we rely on gnulib
which provides a replacement printf that is sane.

The example code is designed to compile against the normal OS headers,
with no use of gnulib and thus has to use the platform specific printf.
To deal with this we must use the macros PRI* macros from inttypes.h
to get the platform specific format string.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
examples/admin/client_info.c
examples/admin/list_clients.c
examples/domtop/domtop.c