]> git.lizzy.rs Git - plan9front.git/blob - sys/include/ape/assert.h
ape: move strdup() from libbsd to libap (from sources)
[plan9front.git] / sys / include / ape / assert.h
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 */