Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / Usermode / Libraries / libc.so_src / include_exp / assert.h
1 /*
2  * Acess2 C Library
3  * - By John Hodge (thePowersGang)
4  *
5  * assert.h
6  * - assert(expr)
7  */
8 #ifndef _LIBC__ASSERT_H_
9 #define _LIBC__ASSERT_H_
10
11 #ifdef NDEBUG
12 # define assert(expr)   do{}while(0)
13 #else
14 # define assert(expr)   do{if(!(expr)) { fprintf(stderr, "%s:%i: Assertion '%s' failed\n", __FILE__, __LINE__, #expr); exit(-1);}}while(0)
15 #endif
16
17 #endif
18

UCC git Repository :: git.ucc.asn.au