diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-21 19:34:47 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-07-21 19:34:47 +0200 |
commit | a2952398e5de8746a761a59686619d08d376bce3 (patch) | |
tree | df2373bb1119468873c667624769455c36dc3786 /kern/assert.h | |
parent | ba1b3afd50913473f3036a63b4a82d7ba5c42009 (diff) | |
parent | 92e98a7f4d4fa75b286a067e1d1caef514fccb0d (diff) |
Merge branch 'master' into master-gdb_stubs
Diffstat (limited to 'kern/assert.h')
-rw-r--r-- | kern/assert.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/kern/assert.h b/kern/assert.h index 2829728b..7b66d1b1 100644 --- a/kern/assert.h +++ b/kern/assert.h @@ -29,26 +29,21 @@ /* assert.h 4.2 85/01/21 */ -#include <kern/macro_help.h> +#include <kern/macros.h> #ifndef NDEBUG #define MACH_ASSERT 1 #endif #if MACH_ASSERT -extern void Assert(char *exp, char *filename, int line) __attribute__ ((noreturn)); +extern void Assert(const char *exp, const char *filename, int line) __attribute__ ((noreturn)); #define assert(ex) \ -MACRO_BEGIN \ - if (!(ex)) \ - Assert(#ex, __FILE__, __LINE__); \ -MACRO_END - -#ifdef lint -#define assert_static(x) -#else /* lint */ + ((ex) \ + ? (void) (0) \ + : Assert (#ex, __FILE__, __LINE__)) + #define assert_static(x) assert(x) -#endif /* lint */ #else /* MACH_ASSERT */ #define assert(ex) |