--- embedaddon/lighttpd/src/buffer.h 2013/10/14 10:32:47 1.1.1.1 +++ embedaddon/lighttpd/src/buffer.h 2014/06/15 20:20:06 1.1.1.2 @@ -9,7 +9,6 @@ #include #include -#include typedef struct { char *ptr; @@ -127,7 +126,10 @@ int light_isalnum(int c); #define CONST_BUF_LEN(x) x->ptr, x->used ? x->used - 1 : 0 -#define SEGFAULT() do { fprintf(stderr, "%s.%d: aborted\n", __FILE__, __LINE__); abort(); } while(0) #define UNUSED(x) ( (void)(x) ) + +void log_failed_assert(const char *filename, unsigned int line, const char *msg) LI_NORETURN; +#define force_assert(x) do { if (!(x)) log_failed_assert(__FILE__, __LINE__, "assertion failed: " #x); } while(0) +#define SEGFAULT() log_failed_assert(__FILE__, __LINE__, "aborted"); #endif