aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/cmocka.h34
-rw-r--r--src/cmocka.c33
2 files changed, 33 insertions, 34 deletions
diff --git a/include/cmocka.h b/include/cmocka.h
index f8c1ec2..8523df8 100644
--- a/include/cmocka.h
+++ b/include/cmocka.h
@@ -57,40 +57,6 @@ int __stdcall IsDebuggerPresent();
* @{
*/
-/* Printf format used to display uintmax_t as a hexidecimal. */
-#ifndef UintMaxTypePrintfFormat
-# ifdef _WIN32
-# define UintMaxTypePrintfFormat "0x%I64x"
-# else
-# if __WORDSIZE == 64
-# define UintMaxTypePrintfFormat "%#lx"
-# else
-# define UintMaxTypePrintfFormat "%#llx"
-# endif
-# endif /* _WIN32 */
-#endif /* UintMaxTypePrintfFormat */
-
-/* Printf format used to display uintmax_t as a decimal. */
-#ifndef UintMaxTypePrintfFormatDecimal
-# ifdef _WIN32
-# define UintMaxTypePrintfFormatDecimal "%I64u"
-# else
-# if __WORDSIZE == 64
-# define UintMaxTypePrintfFormatDecimal "%lu"
-# else
-# define UintMaxTypePrintfFormatDecimal "%llu"
-# endif
-# endif /* _WIN32 */
-#endif /* UintMaxTypePrintfFormat */
-
-#ifndef FloatPrintfFormat
-# define FloatPrintfFormat "%f"
-#endif /* FloatPrintfFormat */
-
-#ifndef DoublePrintfFormat
-# define DoublePrintfFormat "%f"
-#endif /* DoublePrintfFormat */
-
/* Perform an unsigned cast to uintmax_t. */
#define cast_to_largest_integral_type(value) \
((uintmax_t)(value))
diff --git a/src/cmocka.c b/src/cmocka.c
index d94feb0..513eb9d 100644
--- a/src/cmocka.c
+++ b/src/cmocka.c
@@ -109,6 +109,39 @@
# define cm_longjmp(env, val) longjmp(env, val)
#endif
+/* Printf format used to display uintmax_t as a hexidecimal. */
+#ifndef UintMaxTypePrintfFormat
+# ifdef _WIN32
+# define UintMaxTypePrintfFormat "0x%I64x"
+# else
+# if __WORDSIZE == 64
+# define UintMaxTypePrintfFormat "%#lx"
+# else
+# define UintMaxTypePrintfFormat "%#llx"
+# endif
+# endif /* _WIN32 */
+#endif /* UintMaxTypePrintfFormat */
+
+/* Printf format used to display uintmax_t as a decimal. */
+#ifndef UintMaxTypePrintfFormatDecimal
+# ifdef _WIN32
+# define UintMaxTypePrintfFormatDecimal "%I64u"
+# else
+# if __WORDSIZE == 64
+# define UintMaxTypePrintfFormatDecimal "%lu"
+# else
+# define UintMaxTypePrintfFormatDecimal "%llu"
+# endif
+# endif /* _WIN32 */
+#endif /* UintMaxTypePrintfFormat */
+
+#ifndef FloatPrintfFormat
+# define FloatPrintfFormat "%f"
+#endif /* FloatPrintfFormat */
+
+#ifndef DoublePrintfFormat
+# define DoublePrintfFormat "%f"
+#endif /* DoublePrintfFormat */
/*
* Declare and initialize a uintmax_t variable name