2019-10-09 09:23:49 -04:00
|
|
|
/* Copyright (c) 2001 Matej Pfajfar.
|
|
|
|
* Copyright (c) 2001-2004, Roger Dingledine.
|
|
|
|
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
|
|
|
* Copyright (c) 2007-2019, The Tor Project, Inc. */
|
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file looks like a C header, but its purpose is a bit different.
|
|
|
|
*
|
|
|
|
* We never include it from our real C files; we only tell Coccinelle
|
|
|
|
* about it in apply.sh.
|
|
|
|
*
|
|
|
|
* It tells the Coccinelle semantic patching tool how to understand
|
|
|
|
* things that would otherwise not be good C syntax, or which would
|
|
|
|
* otherwise not make sense to it as C. It doesn't need to produce
|
|
|
|
* semantically equivalent C, or even correct C: it only has to produce
|
|
|
|
* syntactically valid C.
|
|
|
|
*/
|
|
|
|
|
2019-10-09 10:21:15 -04:00
|
|
|
#define MOCK_DECL(a, b, c) a b c
|
2019-04-10 12:27:50 -05:00
|
|
|
#define MOCK_IMPL(a, b, c) a b c
|
|
|
|
#define CHECK_PRINTF(a, b)
|
2019-10-09 10:38:22 -04:00
|
|
|
#define CHECK_SCANF(a, b)
|
2019-04-10 12:27:50 -05:00
|
|
|
#define STATIC static
|
2019-10-09 11:14:28 -04:00
|
|
|
#define EXTERN(a,b) extern a b;
|
2019-09-11 18:45:52 -04:00
|
|
|
|
|
|
|
#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
|
2019-10-09 09:52:05 -04:00
|
|
|
#define DISABLE_GCC_WARNING(x)
|
|
|
|
#define ENABLE_GCC_WARNING(x)
|
2019-09-11 18:45:52 -04:00
|
|
|
|
2019-10-09 10:54:11 -04:00
|
|
|
#define HANDLE_DECL(a,b,c)
|
|
|
|
#define HANDLE_IMPL(a,b,c)
|
2019-09-11 18:45:52 -04:00
|
|
|
#define HT_ENTRY(x) void *
|
|
|
|
#define HT_HEAD(a,b) struct ht_head
|
2019-10-09 09:38:43 -04:00
|
|
|
#define HT_INITIALIZER() { }
|
2019-09-11 18:45:52 -04:00
|
|
|
#define X509 struct x509_st
|
|
|
|
#define STACK_OF(x) struct foo_stack_t
|
2019-10-09 09:58:42 -04:00
|
|
|
#define TOR_TAILQ_HEAD(a,b) struct tailq_head
|
|
|
|
#define TOR_TAILQ_ENTRY(a) struct tailq_entry
|
|
|
|
#define TOR_SIMPLEQ_HEAD(a,b) struct simpleq_entry
|
|
|
|
#define TOR_SIMPLEQ_ENTRY(a) struct simpleq_entry
|
2019-10-09 10:19:58 -04:00
|
|
|
#define TOR_LIST_HEAD(a,b) struct list_head
|
|
|
|
#define TOR_LIST_ENTRY(a) struct list_entry
|
|
|
|
#define TOR_SLIST_HEAD(a,b) struct slist_head
|
|
|
|
#define TOR_SLIST_ENTRY(a) struct slist_entry
|
2019-10-09 10:01:19 -04:00
|
|
|
|
|
|
|
#define NS_DECL(a, b, c) a b c
|
|
|
|
#define NS(a) a
|
2019-10-09 10:49:47 -04:00
|
|
|
|
2019-10-09 12:39:31 -04:00
|
|
|
#define CONF_TEST_MEMBERS(a,b,c)
|
|
|
|
#define DUMMY_CONF_TEST_MEMBERS
|
|
|
|
|
2019-10-09 10:49:47 -04:00
|
|
|
#define EAT_SEMICOLON extern int dummy__;
|