summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-06-30 16:40:59 +0000
committerJim Meyering <jim@meyering.net>2005-06-30 16:40:59 +0000
commita9129f0786342c0f650ca782a10ebd676c266cfe (patch)
treeae6e1bd2020192f9f5fd5dace61a9f856af86a2e /src
parent36835110b6e1f1b25ca3171f06dde797b8c84bce (diff)
downloadcoreutils-a9129f0786342c0f650ca782a10ebd676c266cfe.tar.xz
(VERIFY): Guard definition with #ifndef.
(VERIFY_EXPR): Undef before defining.
Diffstat (limited to 'src')
-rw-r--r--src/system.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/system.h b/src/system.h
index fbaeefe18..b5caf0d06 100644
--- a/src/system.h
+++ b/src/system.h
@@ -812,15 +812,18 @@ ptr_align (void const *ptr, size_t alignment)
return (void *) (p1 - (size_t) p1 % alignment);
}
-#define GL_CONCAT0(x, y) x##y
-#define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
+#ifndef VERIFY
+# define GL_CONCAT0(x, y) x##y
+# define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
/* Verify a requirement at compile-time (unlike assert, which is runtime). */
-#define VERIFY(assertion) \
- struct GL_CONCAT (compile_time_assert_, __LINE__) \
- { char a[(assertion) ? 1 : -1]; }
+# define VERIFY(assertion) \
+ struct GL_CONCAT (compile_time_assert_, __LINE__) \
+ { char a[(assertion) ? 1 : -1]; }
+#endif
/* Like the above, but use an expression rather than a struct declaration.
This macro may be used in some contexts where the other may not. */
+#undef VERIFY_EXPR
#define VERIFY_EXPR(assertion) \
(void)((struct {char a[(assertion) ? 1 : -1]; } *) 0)