#define __func__ __FUNCTION__
#endif
-/*
- * Largest integral type. This type should be large enough to hold any
- * pointer or integer supported by the compiler.
- */
-
/* If __WORDSIZE is not set, try to figure it out and default to 32 bit. */
#ifndef __WORDSIZE
# if defined(__x86_64__) && !defined(__ILP32__)
# endif
#endif
+#ifdef DOXYGEN
+/**
+ * Largest integral type. This type should be large enough to hold any
+ * pointer or integer supported by the compiler.
+ */
+typedef uintmax_t LargestIntegralType;
+#else /* DOXGEN */
#ifndef LargestIntegralType
# if __WORDSIZE == 64
# define LargestIntegralType unsigned long int
# define LargestIntegralType unsigned long long int
# endif
#endif /* LargestIntegralType */
+#endif /* DOXYGEN */
/* Printf format used to display LargestIntegralType. */
#ifndef LargestIntegralTypePrintfFormat
#define cast_to_pointer_integral_type(value) \
((uintptr_t)((size_t)(value)))
-/* Perform a cast of a pointer to uintmax_t */
+/* Perform a cast of a pointer to LargestIntegralType */
#define cast_ptr_to_largest_integral_type(value) \
cast_to_largest_integral_type(cast_to_pointer_integral_type(value))
*
* @see will_return()
*/
-uintmax_t mock(void);
+LargestIntegralType mock(void);
#else
#define mock() _mock(__func__, __FILE__, __LINE__)
#endif
* @see mock()
* @see will_return_count()
*/
-void will_return(#function, uintmax_t value);
+void will_return(#function, LargestIntegralType value);
#else
#define will_return(function, value) \
_will_return(#function, __FILE__, __LINE__, \
*
* @see mock()
*/
-void will_return_count(#function, uintmax_t value, int count);
+void will_return_count(#function, LargestIntegralType value, int count);
#else
#define will_return_count(function, value, count) \
_will_return(#function, __FILE__, __LINE__, \
* @see will_return_count()
* @see mock()
*/
-void will_return_always(#function, uintmax_t value);
+void will_return_always(#function, LargestIntegralType value);
#else
#define will_return_always(function, value) \
will_return_count(function, (value), -1)
*
* @see check_expected().
*/
-void expect_in_set(#function, #parameter, uintmax_t value_array[]);
+void expect_in_set(#function, #parameter, LargestIntegralType value_array[]);
#else
#define expect_in_set(function, parameter, value_array) \
expect_in_set_count(function, parameter, value_array, 1)
*
* @see check_expected().
*/
-void expect_in_set_count(#function, #parameter, uintmax_t value_array[], size_t count);
+void expect_in_set_count(#function, #parameter, LargestIntegralType value_array[], size_t count);
#else
#define expect_in_set_count(function, parameter, value_array, count) \
_expect_in_set(#function, #parameter, __FILE__, __LINE__, value_array, \
*
* @see check_expected().
*/
-void expect_not_in_set(#function, #parameter, uintmax_t value_array[]);
+void expect_not_in_set(#function, #parameter, LargestIntegralType value_array[]);
#else
#define expect_not_in_set(function, parameter, value_array) \
expect_not_in_set_count(function, parameter, value_array, 1)
*
* @see check_expected().
*/
-void expect_not_in_set_count(#function, #parameter, uintmax_t value_array[], size_t count);
+void expect_not_in_set_count(#function, #parameter, LargestIntegralType value_array[], size_t count);
#else
#define expect_not_in_set_count(function, parameter, value_array, count) \
_expect_not_in_set( \
*
* @see check_expected().
*/
-void expect_in_range(#function, #parameter, uintmax_t minimum, uintmax_t maximum);
+void expect_in_range(#function, #parameter, LargestIntegralType minimum, LargestIntegralType maximum);
#else
#define expect_in_range(function, parameter, minimum, maximum) \
expect_in_range_count(function, parameter, minimum, maximum, 1)
*
* @see check_expected().
*/
-void expect_in_range_count(#function, #parameter, uintmax_t minimum, uintmax_t maximum, size_t count);
+void expect_in_range_count(#function, #parameter, LargestIntegralType minimum, LargestIntegralType maximum, size_t count);
#else
#define expect_in_range_count(function, parameter, minimum, maximum, count) \
_expect_in_range(#function, #parameter, __FILE__, __LINE__, minimum, \
*
* @see check_expected().
*/
-void expect_not_in_range(#function, #parameter, uintmax_t minimum, uintmax_t maximum);
+void expect_not_in_range(#function, #parameter, LargestIntegralType minimum, LargestIntegralType maximum);
#else
#define expect_not_in_range(function, parameter, minimum, maximum) \
expect_not_in_range_count(function, parameter, minimum, maximum, 1)
*
* @see check_expected().
*/
-void expect_not_in_range_count(#function, #parameter, uintmax_t minimum, uintmax_t maximum, size_t count);
+void expect_not_in_range_count(#function, #parameter, LargestIntegralType minimum, LargestIntegralType maximum, size_t count);
#else
#define expect_not_in_range_count(function, parameter, minimum, maximum, \
count) \
*
* @see check_expected().
*/
-void expect_value(#function, #parameter, uintmax_t value);
+void expect_value(#function, #parameter, LargestIntegralType value);
#else
#define expect_value(function, parameter, value) \
expect_value_count(function, parameter, value, 1)
*
* @see check_expected().
*/
-void expect_value_count(#function, #parameter, uintmax_t value, size_t count);
+void expect_value_count(#function, #parameter, LargestIntegralType value, size_t count);
#else
#define expect_value_count(function, parameter, value, count) \
_expect_value(#function, #parameter, __FILE__, __LINE__, \
*
* @see check_expected().
*/
-void expect_not_value(#function, #parameter, uintmax_t value);
+void expect_not_value(#function, #parameter, LargestIntegralType value);
#else
#define expect_not_value(function, parameter, value) \
expect_not_value_count(function, parameter, value, 1)
*
* @see check_expected().
*/
-void expect_not_value_count(#function, #parameter, uintmax_t value, size_t count);
+void expect_not_value_count(#function, #parameter, LargestIntegralType value, size_t count);
#else
#define expect_not_value_count(function, parameter, value, count) \
_expect_not_value(#function, #parameter, __FILE__, __LINE__, \
*
* @param[in] maximum The maximum value allowed.
*/
-void assert_in_range(uintmax_t value, uintmax_t minimum, uintmax_t maximum);
+void assert_in_range(LargestIntegralType value, LargestIntegralType minimum, LargestIntegralType maximum);
#else
#define assert_in_range(value, minimum, maximum) \
_assert_in_range( \
*
* @param[in] maximum The maximum value to compare.
*/
-void assert_not_in_range(uintmax_t value, uintmax_t minimum, uintmax_t maximum);
+void assert_not_in_range(LargestIntegralType value, LargestIntegralType minimum, LargestIntegralType maximum);
#else
#define assert_not_in_range(value, minimum, maximum) \
_assert_not_in_range( \
*
* @param[in] count The size of the values array.
*/
-void assert_in_set(uintmax_t value, uintmax_t values[], size_t count);
+void assert_in_set(LargestIntegralType value, LargestIntegralType values[], size_t count);
#else
#define assert_in_set(value, values, number_of_values) \
_assert_in_set(value, values, number_of_values, __FILE__, __LINE__)
*
* @param[in] count The size of the values array.
*/
-void assert_not_in_set(uintmax_t value, uintmax_t values[], size_t count);
+void assert_not_in_set(LargestIntegralType value, LargestIntegralType values[], size_t count);
#else
#define assert_not_in_set(value, values, number_of_values) \
_assert_not_in_set(value, values, number_of_values, __FILE__, __LINE__)