assert.h 367 B

12345678910111213141516
  1. #ifdef NDEBUG
  2. #define assert(ignore)
  3. #else
  4. #define assert(expression) \
  5. do { if (!(expression)) __assert ((expression), __FILE__, __LINE__); } while (0)
  6. #define __assert(expression, file, line) \
  7. { _eprintf ("Failed assertion " #expression \
  8. " at line %d of `" file "'.\n", line); \
  9. abort (); }
  10. void _eprintf (); /* Defined in gnulib */
  11. #endif