summaryrefslogtreecommitdiff
path: root/include/cmocka.h
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-07-25 14:31:23 +0100
committerAndreas Schneider <asn@cryptomilk.org>2014-07-28 09:19:03 +0200
commitd07cff1b13af4fde05d2fa081c7f33c115ecf841 (patch)
tree3e45a62c8e510ddde6e543ea4d440abc9d34045c /include/cmocka.h
parent8642ef21b07e025a9aa117867811a725e2fb597e (diff)
downloadcmocka-d07cff1b13af4fde05d2fa081c7f33c115ecf841.tar.gz
cmocka-d07cff1b13af4fde05d2fa081c7f33c115ecf841.tar.bz2
cmocka-d07cff1b13af4fde05d2fa081c7f33c115ecf841.zip
cmocka: use ISO C99 PRIu64 over LargestIntegralTypePrintfUnsignedFormat
With commit commit 8642ef21b07(cmocka: introduce LargestIntegralTypePrintfUnsignedFormat modifier) we introduces this superfluous macro in order to work around the differences when printing 64bit unsigned integer values. Rather than reinventing the wheel use the C99's PRIu64 and fall back locally to their platform/compiler specific counterparts if the inttypes.h header does not exist. Thanks to scythe from the #cmocka channel for pointing out. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include/cmocka.h')
-rw-r--r--include/cmocka.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/include/cmocka.h b/include/cmocka.h
index 5814805..a60b2a5 100644
--- a/include/cmocka.h
+++ b/include/cmocka.h
@@ -85,15 +85,6 @@ int __stdcall IsDebuggerPresent();
#endif /* _WIN32 */
#endif /* LargestIntegralTypePrintfFormat */
-/* Printf format used to display LargestIntegralType as unsigned. */
-#ifndef LargestIntegralTypePrintfUnsignedFormat
-#ifdef _WIN32
-#define LargestIntegralTypePrintfUnsignedFormat "%I64u"
-#else
-#define LargestIntegralTypePrintfUnsignedFormat "%llu"
-#endif /* _WIN32 */
-#endif /* LargestIntegralTypePrintfFormat */
-
/* Perform an unsigned cast to LargestIntegralType. */
#define cast_to_largest_integral_type(value) \
((LargestIntegralType)((size_t)(value)))