[Mesa-dev] [PATCH 21/25] egl: Add STATIC_ASSERT() macro

Chad Versace chad.versace at linux.intel.com
Sun Feb 9 13:37:57 PST 2014


Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 src/egl/main/eglcompiler.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/egl/main/eglcompiler.h b/src/egl/main/eglcompiler.h
index 2499172..53dab54 100644
--- a/src/egl/main/eglcompiler.h
+++ b/src/egl/main/eglcompiler.h
@@ -89,4 +89,9 @@
 #  define __FUNCTION__ __func__
 #endif
 
+#define STATIC_ASSERT(COND) \
+   do { \
+      (void) sizeof(char [1 - 2*!(COND)]); \
+   } while (0)
+
 #endif /* EGLCOMPILER_INCLUDED */
-- 
1.8.5.3



More information about the mesa-dev mailing list