#ifndef PCI_HAVE_Uxx_TYPES
#ifdef PCI_OS_WINDOWS
-/* On Windows compilers, use <windef.h> */
-#include <windef.h>
+/* On Windows compilers, use <windows.h> */
+#include <windows.h>
typedef BYTE u8;
typedef WORD u16;
typedef DWORD u32;
typedef unsigned __int64 u64;
#define PCI_U64_FMT_X "I64x"
+#define PCI_U64_FMT_U "I64u"
#elif defined(PCI_HAVE_STDINT_H) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
/* Use standard types in C99 and newer */
typedef uint32_t u32;
typedef uint64_t u64;
#define PCI_U64_FMT_X PRIx64
+#define PCI_U64_FMT_U PRIu64
#else
/* Hope for POSIX types from <sys/types.h> */
#if ULONG_MAX > 0xffffffff
typedef unsigned long u64;
#define PCI_U64_FMT_X "lx"
+#define PCI_U64_FMT_U "lu"
#else
typedef unsigned long long u64;
#define PCI_U64_FMT_X "llx"
+#define PCI_U64_FMT_U "llu"
#endif
#endif