unix: add STATIC_ASSERT macro

This commit is contained in:
Ben Noordhuis 2013-03-06 23:59:48 +01:00
parent ee9899e28b
commit ef9b065532

View File

@ -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))