Mesa (master): egl: Add STATIC_ASSERT() macro
Chad Versace
chadversary at kemper.freedesktop.org
Mon Mar 17 23:14:39 UTC 2014
Module: Mesa
Branch: master
Commit: cefa06cd6967f2c2db2acfb54a4bf3be398a3ce8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cefa06cd6967f2c2db2acfb54a4bf3be398a3ce8
Author: Chad Versace <chad.versace at linux.intel.com>
Date: Tue Jan 7 14:23:49 2014 -0800
egl: Add STATIC_ASSERT() macro
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 */
More information about the mesa-commit
mailing list