22 lines
723 B
C
22 lines
723 B
C
#ifndef ASSERT_H_
|
|
#define ASSERT_H_
|
|
|
|
#define assert(cond) \
|
|
do { \
|
|
if (!(cond)) { \
|
|
__libc_assert_failed( \
|
|
__FILE__, \
|
|
__LINE__, \
|
|
__FUNCTION__, \
|
|
#cond); \
|
|
} \
|
|
} while (0)
|
|
|
|
extern void __libc_assert_failed(
|
|
const char *file,
|
|
int line,
|
|
const char *func,
|
|
const char *cond);
|
|
|
|
#endif
|