summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-02 13:15:10 -0400
committerNick Mathewson <nickm@torproject.org>2016-08-02 13:15:10 -0400
commitc68a23a135369380dad5cb1ff393edee74e6d6ac (patch)
tree07d73988f70fcaf6a61ccf94a87dacd7e68eed5e /src/or/or.h
parent8e9a6543e110eb8f96169f011e18c3e4b6a4f7d1 (diff)
downloadtor-c68a23a135369380dad5cb1ff393edee74e6d6ac.tar.gz
tor-c68a23a135369380dad5cb1ff393edee74e6d6ac.zip
Bufferevent removal: remove HAS_BUFFEREVENT macros and usage
This is another way that we had bufferevents-only code marked.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/or/or.h b/src/or/or.h
index d04fc28564..e091d5cfd3 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1826,40 +1826,6 @@ static inline listener_connection_t *TO_LISTENER_CONN(connection_t *c)
return DOWNCAST(listener_connection_t, c);
}
-/* Conditional macros to help write code that works whether bufferevents are
- disabled or not.
-
- We can't just write:
- if (conn->bufev) {
- do bufferevent stuff;
- } else {
- do other stuff;
- }
- because the bufferevent stuff won't even compile unless we have a fairly
- new version of Libevent. Instead, we say:
- IF_HAS_BUFFEREVENT(conn, { do_bufferevent_stuff } );
- or:
- IF_HAS_BUFFEREVENT(conn, {
- do bufferevent stuff;
- }) ELSE_IF_NO_BUFFEREVENT {
- do non-bufferevent stuff;
- }
- If we're compiling with bufferevent support, then the macros expand more or
- less to:
- if (conn->bufev) {
- do_bufferevent_stuff;
- } else {
- do non-bufferevent stuff;
- }
- and if we aren't using bufferevents, they expand more or less to:
- { do non-bufferevent stuff; }
-*/
-#define HAS_BUFFEREVENT(c) (0)
-#define IF_HAS_BUFFEREVENT(c, stmt) (void)0
-#define ELSE_IF_NO_BUFFEREVENT ;
-#define IF_HAS_NO_BUFFEREVENT(c) \
- if (1)
-
/** What action type does an address policy indicate: accept or reject? */
typedef enum {
ADDR_POLICY_ACCEPT=1,