[debug.h] Introduce a static assert using the array with negative size trick

It is inspired by the COMPILE_ASSERT from WebKit and is using the well
known trick to get compile time assertions.
This commit is contained in:
Holger Freyther 2008-12-28 16:32:41 +00:00
parent 5e85c8ea40
commit 1ad732c699
1 changed files with 2 additions and 0 deletions

View File

@ -19,6 +19,8 @@
#define DEBUGP(xss, fmt, args...)
#endif
#define static_assert(exp, name) typedef int dummy##name [(exp) ? 1 : -1];
void debugp(unsigned int subsys, char *file, int line, const char *format, ...);
void debug_parse_category_mask(const char* mask);
void debug_use_color(int use_color);