xref: /plan9/sys/include/ape/assert.h (revision 7dd7cddf99dd7472612f1413b4da293630e6b1bc)
1 #pragma lib "/$M/lib/ape/libap.a"
2 
3 #undef assert
4 #ifdef NDEBUG
5 #define assert(ignore) ((void)0)
6 #else
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 extern void _assert(char *, unsigned);
12 
13 #ifdef __cplusplus
14 }
15 #endif
16 #define assert(e) {if(!(e))_assert(__FILE__, __LINE__);}
17 #endif /* NDEBUG */
18