diff options
author | teor <teor@torproject.org> | 2019-10-24 10:00:47 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-10-24 10:00:47 +1000 |
commit | 20606b8a15483b1709dac48fd44f758e292607b8 (patch) | |
tree | 74aec1e696fe6e5eb32e7a8d8251d812e4541865 /src/feature | |
parent | 9586ae178a38436e07278f141801208c04b37191 (diff) | |
parent | 931a5db2a7ded73ddd72cb6646b506d49782f3ec (diff) | |
download | tor-20606b8a15483b1709dac48fd44f758e292607b8.tar.gz tor-20606b8a15483b1709dac48fd44f758e292607b8.zip |
Merge remote-tracking branch 'tor-github/pr/1447'
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/client/proxymode.h | 2 | ||||
-rw-r--r-- | src/feature/control/control_cmd.c | 2 | ||||
-rw-r--r-- | src/feature/control/control_events.c | 2 | ||||
-rw-r--r-- | src/feature/dirauth/dirauth_periodic.c | 2 | ||||
-rw-r--r-- | src/feature/dircommon/consdiff.c | 2 | ||||
-rw-r--r-- | src/feature/dirparse/authcert_members.h | 2 | ||||
-rw-r--r-- | src/feature/hs/hs_service.c | 2 | ||||
-rw-r--r-- | src/feature/relay/relay_periodic.c | 2 | ||||
-rw-r--r-- | src/feature/relay/router.c | 2 | ||||
-rw-r--r-- | src/feature/relay/routermode.h | 4 |
10 files changed, 17 insertions, 5 deletions
diff --git a/src/feature/client/proxymode.h b/src/feature/client/proxymode.h index f8352922c7..770a519155 100644 --- a/src/feature/client/proxymode.h +++ b/src/feature/client/proxymode.h @@ -14,4 +14,4 @@ int proxy_mode(const or_options_t *options); -#endif +#endif /* !defined(TOR_PROXYMODE_H) */ diff --git a/src/feature/control/control_cmd.c b/src/feature/control/control_cmd.c index de1bef7e59..68179beef0 100644 --- a/src/feature/control/control_cmd.c +++ b/src/feature/control/control_cmd.c @@ -2248,6 +2248,7 @@ typedef struct control_cmd_def_t { */ #define CMD_FL_WIPE (1u<<0) +#ifndef COCCI /** Macro: declare a command with a one-line argument, a given set of flags, * and a syntax definition. **/ @@ -2280,6 +2281,7 @@ typedef struct control_cmd_def_t { 0, \ &obsolete_syntax, \ } +#endif /* !defined(COCCI) */ /** * An array defining all the recognized controller commands. diff --git a/src/feature/control/control_events.c b/src/feature/control/control_events.c index 00659c0477..12b73641b2 100644 --- a/src/feature/control/control_events.c +++ b/src/feature/control/control_events.c @@ -1663,6 +1663,7 @@ control_event_status(int type, int severity, const char *format, va_list args) return 0; } +#ifndef COCCI #define CONTROL_EVENT_STATUS_BODY(event, sev) \ int r; \ do { \ @@ -1674,6 +1675,7 @@ control_event_status(int type, int severity, const char *format, va_list args) r = control_event_status((event), (sev), format, ap); \ va_end(ap); \ } while (0) +#endif /* !defined(COCCI) */ /** Format and send an EVENT_STATUS_GENERAL event whose main text is obtained * by formatting the arguments using the printf-style <b>format</b>. */ diff --git a/src/feature/dirauth/dirauth_periodic.c b/src/feature/dirauth/dirauth_periodic.c index 02727d61b4..fc26358290 100644 --- a/src/feature/dirauth/dirauth_periodic.c +++ b/src/feature/dirauth/dirauth_periodic.c @@ -18,11 +18,13 @@ #include "core/mainloop/periodic.h" +#ifndef COCCI #define DECLARE_EVENT(name, roles, flags) \ static periodic_event_item_t name ## _event = \ PERIODIC_EVENT(name, \ PERIODIC_EVENT_ROLE_##roles, \ flags) +#endif /* !defined(COCCI) */ #define FL(name) (PERIODIC_EVENT_FLAG_##name) diff --git a/src/feature/dircommon/consdiff.c b/src/feature/dircommon/consdiff.c index 2c4d3a19c0..fbfa9e0c0a 100644 --- a/src/feature/dircommon/consdiff.c +++ b/src/feature/dircommon/consdiff.c @@ -530,10 +530,12 @@ typedef struct router_id_iterator_t { cdline_t hash; } router_id_iterator_t; +#ifndef COCCI /** * Initializer for a router_id_iterator_t. */ #define ROUTER_ID_ITERATOR_INIT { { NULL, 0 }, { NULL, 0 } } +#endif /* !defined(COCCI) */ /** Given an index *<b>idxp</b> into the consensus at <b>cons</b>, advance * the index to the next router line ("r ...") in the consensus, or to diff --git a/src/feature/dirparse/authcert_members.h b/src/feature/dirparse/authcert_members.h index 8f6fdf17c5..3b44c3eb02 100644 --- a/src/feature/dirparse/authcert_members.h +++ b/src/feature/dirparse/authcert_members.h @@ -26,4 +26,4 @@ NO_ARGS, NEED_OBJ),\ T01("dir-address", K_DIR_ADDRESS, GE(1), NO_OBJ) -#endif +#endif /* !defined(TOR_AUTHCERT_MEMBERS_H) */ diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c index 15db5dd1de..da772fa6d2 100644 --- a/src/feature/hs/hs_service.c +++ b/src/feature/hs/hs_service.c @@ -67,6 +67,7 @@ #include <unistd.h> #endif +#ifndef COCCI /** Helper macro. Iterate over every service in the global map. The var is the * name of the service pointer. */ #define FOR_EACH_SERVICE_BEGIN(var) \ @@ -88,6 +89,7 @@ (var = service->desc_next); \ if (var == NULL) continue; #define FOR_EACH_DESCRIPTOR_END } STMT_END ; +#endif /* !defined(COCCI) */ /* Onion service directory file names. */ static const char fname_keyfile_prefix[] = "hs_ed25519"; diff --git a/src/feature/relay/relay_periodic.c b/src/feature/relay/relay_periodic.c index b48b495895..d1b3183953 100644 --- a/src/feature/relay/relay_periodic.c +++ b/src/feature/relay/relay_periodic.c @@ -31,11 +31,13 @@ #include "feature/nodelist/routerinfo_st.h" #include "feature/control/control_events.h" +#ifndef COCCI #define DECLARE_EVENT(name, roles, flags) \ static periodic_event_item_t name ## _event = \ PERIODIC_EVENT(name, \ PERIODIC_EVENT_ROLE_##roles, \ flags) +#endif /* !defined(COCCI) */ #define FL(name) (PERIODIC_EVENT_FLAG_##name) diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 92803f88a9..5c79010934 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -386,7 +386,7 @@ get_server_identity_key,(void)) return server_identitykey; } -#endif +#endif /* defined(HAVE_MODULE_RELAY) */ /** Return true iff we are a server and the server identity key * has been set. */ diff --git a/src/feature/relay/routermode.h b/src/feature/relay/routermode.h index f6195a8698..9891a038ad 100644 --- a/src/feature/relay/routermode.h +++ b/src/feature/relay/routermode.h @@ -25,7 +25,7 @@ void set_server_advertised(int s); /** Is the relay module enabled? */ #define have_module_relay() (1) -#else +#else /* !defined(HAVE_MODULE_RELAY) */ #define dir_server_mode(options) (((void)(options)),0) #define server_mode(options) (((void)(options)),0) @@ -37,6 +37,6 @@ void set_server_advertised(int s); #define have_module_relay() (0) -#endif +#endif /* defined(HAVE_MODULE_RELAY) */ #endif /* !defined(TOR_ROUTERMODE_H) */ |