]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add some more of our trickier macros to tor-coccinelle.h
authorNick Mathewson <nickm@torproject.org>
Wed, 11 Sep 2019 22:45:52 +0000 (18:45 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 11 Sep 2019 22:45:52 +0000 (18:45 -0400)
Note that this header file behaves a bit strangely.  It is used by
coccinelle just for the purpose of knowing how to parse
difficult-to-parse stuff.  It doesn't need to produce good C -- just
grammatical C.

scripts/coccinelle/tor-coccinelle.h

index 8f625dcee4f14c20a9a9f26ac05ce72643463592..a94c3ef679956d1dd1d6db6e75b46aff38e85cfe 100644 (file)
@@ -1,3 +1,21 @@
 #define MOCK_IMPL(a, b, c) a b c
 #define CHECK_PRINTF(a, b)
 #define STATIC static
+
+#define STMT_BEGIN do {
+#define STMT_END } while (0)
+
+#define BUG(x) (x)
+#define IF_BUG_ONCE(x) if (x)
+
+#define ATTR_NORETURN
+#define ATTR_UNUSED
+#define ATTR_CONST
+#define ATTR_MALLOC
+#define ATTR_WUR
+
+#define HT_ENTRY(x) void *
+#define HT_HEAD(a,b) struct ht_head
+#define HT_INITIALIZER { }
+#define X509 struct x509_st
+#define STACK_OF(x) struct foo_stack_t