mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Define STATIC_ASSERT(cond, msg) to be _Static_assert(cond, msg) everywhere but on Windows where it stays to be INSIST(cond)
This commit is contained in:
committed by
Mark Andrews
parent
82b23ecc5e
commit
5e44a1008f
@@ -208,6 +208,18 @@
|
||||
#define ISC_UNREACHABLE()
|
||||
#endif
|
||||
|
||||
#if !defined(__has_feature)
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR >= 6)
|
||||
#define STATIC_ASSERT(cond, msg) _Static_assert(cond, msg)
|
||||
#elif __has_feature(c_static_assert)
|
||||
#define STATIC_ASSERT(cond, msg) _Static_assert(cond, msg)
|
||||
#else
|
||||
#define STATIC_ASSERT(cond, msg) INSIST(cond)
|
||||
#endif
|
||||
|
||||
#ifdef UNIT_TESTING
|
||||
extern void mock_assert(const int result, const char* const expression,
|
||||
const char * const file, const int line);
|
||||
|
Reference in New Issue
Block a user