Add a static assert macro, for asserting that certain build-time
expressions are true.
Change-Id: I33b0e7168f041e8e8406710d05689e044af45fad
Reviewed-on: https://gerrit.openafs.org/11792
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
# define opr_Verify(ex) __opr_Verify(ex)
#endif
+/* opr_StaticAssert is a static build-time assertion, to assert certain
+ * static values (such as sizeof results). If the assertion fails, the
+ * build will fail. */
+
+#define opr_StaticAssert(ex) \
+ ((void)(sizeof(char[1 - 2 * !(ex)])))
+
/* casestrcpy.c */
#define lcstring opr_lcstring
#define ucstring opr_ucstring