From: John Hodge Date: Sun, 8 Sep 2013 14:28:56 +0000 (+0800) Subject: Usermode/libc - Switched assert() to use SysDebug instead of stderr X-Git-Tag: rel0.15~241 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=4c75a9638c6868c70f2cd4c854e4dcb4096114a7;p=tpg%2Facess2.git Usermode/libc - Switched assert() to use SysDebug instead of stderr - Since most debugging atm is done from the serial log, this is acceptable --- diff --git a/Usermode/Libraries/libc.so_src/include_exp/assert.h b/Usermode/Libraries/libc.so_src/include_exp/assert.h index 826e92e5..dde4aeeb 100644 --- a/Usermode/Libraries/libc.so_src/include_exp/assert.h +++ b/Usermode/Libraries/libc.so_src/include_exp/assert.h @@ -9,12 +9,15 @@ #define _LIBC__ASSERT_H_ #include +//#include +#include //extern void exit(int status); #ifdef NDEBUG # define assert(expr) do{}while(0) #else -# define assert(expr) do{if(!(expr)) { fprintf(stderr, "%s:%i: Assertion '%s' failed\n", __FILE__, __LINE__, #expr); exit(-1);}}while(0) +//# define assert(expr) do{if(!(expr)) { fprintf(stderr, "%s:%i: Assertion '%s' failed\n", __FILE__, __LINE__, #expr); exit(-1);}}while(0) +# define assert(expr) do{if(!(expr)) { _SysDebug("%s:%i: Assertion '%s' failed", __FILE__, __LINE__, #expr); exit(-1);}}while(0) #endif #endif