unix: add STATIC_ASSERT macro
This commit is contained in:
parent
ee9899e28b
commit
ef9b065532
@ -45,6 +45,9 @@
|
||||
# include <CoreServices/CoreServices.h>
|
||||
#endif
|
||||
|
||||
#define STATIC_ASSERT(expr) \
|
||||
void uv__static_assert(int static_assert_failed[0 - !(expr)])
|
||||
|
||||
#define ACCESS_ONCE(type, var) \
|
||||
(*(volatile type*) &(var))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user