release: ChangeLog and ReleaseNotes for 0.4.8.5
[tor.git] / scripts / coccinelle / tor-coccinelle.h
blob44d79325eb54e3c613a1660d3a9b260a919c6675
1 /* Copyright (c) 2001 Matej Pfajfar.
2 * Copyright (c) 2001-2004, Roger Dingledine.
3 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4 * Copyright (c) 2007-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
7 /*
8 * This file looks like a C header, but its purpose is a bit different.
10 * We never include it from our real C files; we only tell Coccinelle
11 * about it in apply.sh.
13 * It tells the Coccinelle semantic patching tool how to understand
14 * things that would otherwise not be good C syntax, or which would
15 * otherwise not make sense to it as C. It doesn't need to produce
16 * semantically equivalent C, or even correct C: it only has to produce
17 * syntactically valid C.
20 #define MOCK_DECL(a, b, c) a b c
21 #define MOCK_IMPL(a, b, c) a b c
22 #define CHECK_PRINTF(a, b)
23 #define CHECK_SCANF(a, b)
24 #define STATIC static
25 #define EXTERN(a,b) extern a b;
27 #define STMT_BEGIN do {
28 #define STMT_END } while (0)
30 #define BUG(x) (x)
31 #define IF_BUG_ONCE(x) if (x)
33 #define ATTR_NORETURN
34 #define ATTR_UNUSED
35 #define ATTR_CONST
36 #define ATTR_MALLOC
37 #define ATTR_WUR
38 #define DISABLE_GCC_WARNING(x)
39 #define ENABLE_GCC_WARNING(x)
41 #define HANDLE_DECL(a,b,c)
42 #define HANDLE_IMPL(a,b,c)
43 #define HT_ENTRY(x) void *
44 #define HT_HEAD(a,b) struct ht_head
45 #define HT_INITIALIZER() { }
46 #define X509 struct x509_st
47 #define STACK_OF(x) struct foo_stack_t
48 #define TOR_TAILQ_HEAD(a,b) struct tailq_head
49 #define TOR_TAILQ_ENTRY(a) struct tailq_entry
50 #define TOR_SIMPLEQ_HEAD(a,b) struct simpleq_entry
51 #define TOR_SIMPLEQ_ENTRY(a) struct simpleq_entry
52 #define TOR_LIST_HEAD(a,b) struct list_head
53 #define TOR_LIST_ENTRY(a) struct list_entry
54 #define TOR_SLIST_HEAD(a,b) struct slist_head
55 #define TOR_SLIST_ENTRY(a) struct slist_entry
57 #define NS_DECL(a, b, c) a b c
58 #define NS(a) a
60 #define CONF_TEST_MEMBERS(a,b,c)
61 #define DUMMY_CONF_TEST_MEMBERS
63 #define EAT_SEMICOLON extern int dummy__;