nasmlib.h: Introduce nasm_build_assert
It's useful to protect our self from some errors at build time. For this sake we should use nasm_build_assert if needed. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
638c1ac078
commit
acf256f4db
1 changed files with 5 additions and 0 deletions
|
@ -172,6 +172,11 @@ no_return nasm_assert_failed(const char *, int, const char *);
|
|||
nasm_assert_failed(__FILE__,__LINE__,#x); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* NASM failure at build time if x != 0
|
||||
*/
|
||||
#define nasm_build_assert(x) (void)(sizeof(char[1-2*!!(x)]))
|
||||
|
||||
/*
|
||||
* ANSI doesn't guarantee the presence of `stricmp' or
|
||||
* `strcasecmp'.
|
||||
|
|
Loading…
Reference in a new issue