X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ftypes.h;h=243997fa7a7da91a11386e1b207c84b0001653e2;hb=4582426202ad6ac6539305dae2c0b70016f014f4;hp=c6b6152e7204619e3b497df3d5e23146f8caec9a;hpb=884a163407cbc179b694294771a016071a6b6dd3;p=pciutils.git diff --git a/lib/types.h b/lib/types.h index c6b6152..243997f 100644 --- a/lib/types.h +++ b/lib/types.h @@ -11,13 +11,14 @@ #ifndef PCI_HAVE_Uxx_TYPES #ifdef PCI_OS_WINDOWS -/* On Windows compilers, use */ -#include +/* On Windows compilers, use */ +#include 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 */ @@ -28,6 +29,7 @@ typedef uint16_t u16; 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 */ @@ -40,9 +42,11 @@ typedef u_int32_t u32; #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