Re: [PATCH v2] examples: fix 64-bit integer formatting on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/2/19 11:24 AM, Daniel P. Berrangé wrote:
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@xxxxxxxxxx>
---
  examples/admin/client_info.c  | 7 ++++---
  examples/admin/list_clients.c | 3 ++-
  examples/domtop/domtop.c      | 8 ++++++--
  3 files changed, 12 insertions(+), 6 deletions(-)

Changed in v2:

  - Now actually commit the int64 casts

ACK

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux