mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
Attempt to placate the OSX buildslaves, which do not appreciate multiple
definitions of `assert'
This commit is contained in:
parent
a01e76b3e5
commit
4595401019
1 changed files with 3 additions and 0 deletions
|
@ -140,6 +140,9 @@ extern void (*do_assert_hook)(void); // Set this to a function you want called a
|
|||
#define assert_zero(expr) toku_do_assert((expr) == 0, #expr, __FUNCTION__, __FILE__, __LINE__, get_maybe_error_errno())
|
||||
#define assert_equals(expr, expected) toku_do_assert((expr) == (expected), (expected), #expr, __FUNCTION__, __FILE__, __LINE__, get_maybe_error_errno())
|
||||
#else
|
||||
#ifdef assert
|
||||
# undef assert // some compilers do not like multiple definitions of a single macro - so undef the existing assert def here
|
||||
#endif
|
||||
#define assert(expr) ((expr) ? (void)0 : toku_do_assert_fail(#expr, __FUNCTION__, __FILE__, __LINE__, get_maybe_error_errno()))
|
||||
#define assert_zero(expr) ((expr) == 0 ? (void)0 : toku_do_assert_zero_fail((uintptr_t)(expr), #expr, __FUNCTION__, __FILE__, __LINE__, get_maybe_error_errno()))
|
||||
#define assert_equals(expr, expected) ((expr) == (expected) ? (void)0 : toku_do_assert_expected_fail((uintptr_t)(expr), (uintptr_t)(expected), #expr, __FUNCTION__, __FILE__, __LINE__, get_maybe_error_errno()))
|
||||
|
|
Loading…
Add table
Reference in a new issue