egl: Add STATIC_ASSERT() macro
authorChad Versace <chad.versace@linux.intel.com>
Tue, 7 Jan 2014 22:23:49 +0000 (14:23 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Mon, 17 Mar 2014 22:39:23 +0000 (15:39 -0700)
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/egl/main/eglcompiler.h

index 2499172a1c5f53566058349d8d2be3a0350a2564..53dab54384ab97d109395af3e52c6aee81834516 100644 (file)
@@ -89,4 +89,9 @@
 #  define __FUNCTION__ __func__
 #endif
 
+#define STATIC_ASSERT(COND) \
+   do { \
+      (void) sizeof(char [1 - 2*!(COND)]); \
+   } while (0)
+
 #endif /* EGLCOMPILER_INCLUDED */