]> mj.ucw.cz Git - pciutils.git/commit
lspci: Define PCI_U64_FMT_U format for printing u64
authorPali Rohár <pali@kernel.org>
Sun, 26 Dec 2021 21:12:00 +0000 (22:12 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 10 Feb 2022 11:58:17 +0000 (12:58 +0100)
commitc3d1d4654f01d13ecc50e459d4cec688323d709e
treea5671ed4abef0efe138166dda5da9ab7973e07b9
parent6811edb82791b1cc18889062a226522b7cdd74a8
lspci: Define PCI_U64_FMT_U format for printing u64

Windows CRTDLL and MSVCRT runtime system libraries do not support %llu
format string in printf. They support only %I64u format string. Fix this
problem by providing PCI_U64_FMT_U macro in the same way as existing
PCI_U64_FMT_X macro (for %llx).

For C99 systems this PCI_U64_FMT_U macro is defined to C99 PRIu64 constant.

This change fixes printing unsigned decimal 64-bit numbers by lspci on
Window systems independently of used compiler (MinGW or MSVC).
lib/types.h
ls-ecaps.c