summaryrefslogtreecommitdiff
path: root/src/buffer.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-06-15 07:46:40 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2021-08-27 02:16:53 -0400
commit1cd73b08a681db8aa7039419ddf9b40b068a2bd3 (patch)
tree42dc1d1c710762643bfc2fc70904e0841e60075f /src/buffer.h
parent4e5b822b16f8c22be608567549a67f5e464d9419 (diff)
downloadlighttpd-git-1cd73b08a681db8aa7039419ddf9b40b068a2bd3.tar.gz
[core] move backtrace and assert macros to ck.[ch]
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 1ebee556..9380ec80 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -262,14 +262,6 @@ static inline int buffer_has_pathsep_suffix (const buffer * const b);
#define CONST_STR_LEN(x) x, (uint32_t)sizeof(x) - 1
-#define LI_NORETURN __attribute_noreturn__
-
-__attribute_cold__
-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");
-
-
/* inline implementations */
__attribute_nonnull__
@@ -408,4 +400,10 @@ static inline void buffer_string_set_length(buffer *b, uint32_t len) {
}
+#include "ck.h"
+#define force_assert(x) ck_assert(x)
+#define log_failed_assert(file,line,msg) ck_bt_abort((file),(line),(msg))
+#define SEGFAULT() ck_bt_abort(__FILE__, __LINE__, "aborted")
+
+
#endif