--- Gnu-Mach/kern/assert.h 2020/09/02 04:45:11 1.1.1.3 +++ Gnu-Mach/kern/assert.h 2020/09/02 04:54:00 1.1.1.6 @@ -29,26 +29,22 @@ /* assert.h 4.2 85/01/21 */ -#include +#include #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, + const char *fun) __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__, __FUNCTION__)) + #define assert_static(x) assert(x) -#endif /* lint */ #else /* MACH_ASSERT */ #define assert(ex)