50 // Printf-style formatters for fixed- and variable-width types as pointers and
51 // integers. These are derived from the definitions in inttypes.h. If the platform
52 // doesn't provide appropriate definitions, they should be provided in
53 // the compiler-specific definitions file (e.g., globalDefinitions_gcc.hpp)
54
55 #define BOOL_TO_STR(_b_) ((_b_) ? "true" : "false")
56
57 // Format 32-bit quantities.
58 #define INT32_FORMAT "%" PRId32
59 #define UINT32_FORMAT "%" PRIu32
60 #define INT32_FORMAT_W(width) "%" #width PRId32
61 #define UINT32_FORMAT_W(width) "%" #width PRIu32
62
63 #define PTR32_FORMAT "0x%08" PRIx32
64 #define PTR32_FORMAT_W(width) "0x%" #width PRIx32
65
66 // Format 64-bit quantities.
67 #define INT64_FORMAT "%" PRId64
68 #define UINT64_FORMAT "%" PRIu64
69 #define UINT64_FORMAT_X "%" PRIx64
70 #define INT64_FORMAT_W(width) "%" #width PRId64
71 #define UINT64_FORMAT_W(width) "%" #width PRIu64
72
73 #define PTR64_FORMAT "0x%016" PRIx64
74
75 // Format jlong, if necessary
76 #ifndef JLONG_FORMAT
77 #define JLONG_FORMAT INT64_FORMAT
78 #endif
79 #ifndef JULONG_FORMAT
80 #define JULONG_FORMAT UINT64_FORMAT
81 #endif
82 #ifndef JULONG_FORMAT_X
83 #define JULONG_FORMAT_X UINT64_FORMAT_X
84 #endif
85
86 // Format pointers which change size between 32- and 64-bit.
87 #ifdef _LP64
88 #define INTPTR_FORMAT "0x%016" PRIxPTR
89 #define PTR_FORMAT "0x%016" PRIxPTR
|
50 // Printf-style formatters for fixed- and variable-width types as pointers and
51 // integers. These are derived from the definitions in inttypes.h. If the platform
52 // doesn't provide appropriate definitions, they should be provided in
53 // the compiler-specific definitions file (e.g., globalDefinitions_gcc.hpp)
54
55 #define BOOL_TO_STR(_b_) ((_b_) ? "true" : "false")
56
57 // Format 32-bit quantities.
58 #define INT32_FORMAT "%" PRId32
59 #define UINT32_FORMAT "%" PRIu32
60 #define INT32_FORMAT_W(width) "%" #width PRId32
61 #define UINT32_FORMAT_W(width) "%" #width PRIu32
62
63 #define PTR32_FORMAT "0x%08" PRIx32
64 #define PTR32_FORMAT_W(width) "0x%" #width PRIx32
65
66 // Format 64-bit quantities.
67 #define INT64_FORMAT "%" PRId64
68 #define UINT64_FORMAT "%" PRIu64
69 #define UINT64_FORMAT_X "%" PRIx64
70 #define UINT64_FORMAT_HEX_W(width) "%" #width PRIx64
71 #define INT64_FORMAT_W(width) "%" #width PRId64
72 #define UINT64_FORMAT_W(width) "%" #width PRIu64
73
74 #define PTR64_FORMAT "0x%016" PRIx64
75
76 // Format jlong, if necessary
77 #ifndef JLONG_FORMAT
78 #define JLONG_FORMAT INT64_FORMAT
79 #endif
80 #ifndef JULONG_FORMAT
81 #define JULONG_FORMAT UINT64_FORMAT
82 #endif
83 #ifndef JULONG_FORMAT_X
84 #define JULONG_FORMAT_X UINT64_FORMAT_X
85 #endif
86
87 // Format pointers which change size between 32- and 64-bit.
88 #ifdef _LP64
89 #define INTPTR_FORMAT "0x%016" PRIxPTR
90 #define PTR_FORMAT "0x%016" PRIxPTR
|