aboutsummaryrefslogtreecommitdiff
path: root/src/lib/cc/compat_compiler.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-03-26 20:13:49 -0400
committerNick Mathewson <nickm@torproject.org>2019-03-26 20:13:49 -0400
commita47b61f329fbe06b7b4935cf9c1923d96a74b649 (patch)
tree283c23aa4230a26fe9b40b1001cb05a457995b4d /src/lib/cc/compat_compiler.h
parent57999e330b82fa3a360406dfb28b7a35fb50d602 (diff)
parent3767eff9bb712bccc86718647c7dc84998a7f95f (diff)
downloadtor-a47b61f329fbe06b7b4935cf9c1923d96a74b649.tar.gz
tor-a47b61f329fbe06b7b4935cf9c1923d96a74b649.zip
Merge branch 'messaging_v3' into messaging_v3_merged
Diffstat (limited to 'src/lib/cc/compat_compiler.h')
-rw-r--r--src/lib/cc/compat_compiler.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/cc/compat_compiler.h b/src/lib/cc/compat_compiler.h
index 3a0f307186..18b76cc1a1 100644
--- a/src/lib/cc/compat_compiler.h
+++ b/src/lib/cc/compat_compiler.h
@@ -217,4 +217,16 @@
/** Macro: Yields the number of elements in array x. */
#define ARRAY_LENGTH(x) ((sizeof(x)) / sizeof(x[0]))
+/**
+ * "Eat" a semicolon that somebody puts at the end of a top-level macro.
+ *
+ * Frequently, we want to declare a macro that people will use at file scope,
+ * and we want to allow people to put a semicolon after the macro.
+ *
+ * This declaration of a struct can be repeated any number of times, and takes
+ * a trailing semicolon afterwards.
+ **/
+#define EAT_SEMICOLON \
+ struct dummy_semicolon_eater__
+
#endif /* !defined(TOR_COMPAT_H) */