assert.h 285 B

1234567891011121314151617
  1. #undef assert
  2. #ifdef NDEBUG
  3. #define assert(x) (void)0
  4. #else
  5. #define assert(x) ((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0))
  6. #endif
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. void __assert_fail (const char *, const char *, int, const char *);
  11. #ifdef __cplusplus
  12. }
  13. #endif