]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/types.h
cxl: Rename caps to be device caps
[pciutils.git] / lib / types.h
index c6b6152e7204619e3b497df3d5e23146f8caec9a..243997fa7a7da91a11386e1b207c84b0001653e2 100644 (file)
 #ifndef PCI_HAVE_Uxx_TYPES
 
 #ifdef PCI_OS_WINDOWS
 #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"
 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 */
 
 #elif defined(PCI_HAVE_STDINT_H) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
 /* Use standard types in C99 and newer */
@@ -28,6 +29,7 @@ typedef uint16_t u16;
 typedef uint32_t u32;
 typedef uint64_t u64;
 #define PCI_U64_FMT_X PRIx64
 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> */
 
 #else
 /* Hope for POSIX types from <sys/types.h> */
@@ -40,9 +42,11 @@ typedef u_int32_t u32;
 #if ULONG_MAX > 0xffffffff
 typedef unsigned long u64;
 #define PCI_U64_FMT_X "lx"
 #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"
 #else
 typedef unsigned long long u64;
 #define PCI_U64_FMT_X "llx"
+#define PCI_U64_FMT_U "llu"
 #endif
 
 #endif
 #endif
 
 #endif