[tor-commits] [tor/master] Eliminate compat.h
nickm at torproject.org
nickm at torproject.org
Fri Jun 29 16:59:55 UTC 2018
commit 6ac64e16ed6958d1a5960c560254217478b7ad87
Author: Nick Mathewson <nickm at torproject.org>
Date: Fri Jun 29 11:42:52 2018 -0400
Eliminate compat.h
---
src/common/include.am | 1 -
src/or/config.c | 1 -
src/or/directory.c | 1 -
src/or/keypin.c | 1 -
src/or/protover.h | 3 +++
src/or/torcert.c | 1 -
src/test/test-memwipe.c | 1 -
src/test/test-timers.c | 1 -
src/test/test.h | 1 -
src/test/test_crypto_openssl.c | 1 -
src/test/test_hs_ntor_cl.c | 1 -
src/test/test_link_handshake.c | 3 ---
src/test/test_ntor_cl.c | 1 -
src/test/test_tortls.c | 3 +--
14 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/src/common/include.am b/src/common/include.am
index 899e76364..7427c6944 100644
--- a/src/common/include.am
+++ b/src/common/include.am
@@ -50,7 +50,6 @@ src_common_libor_event_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
COMMONHEADERS = \
src/common/address_set.h \
- src/common/compat.h \
src/common/compat_libevent.h \
src/common/handles.h \
src/common/procmon.h \
diff --git a/src/or/config.c b/src/or/config.c
index 458b6bae2..e3a4faa31 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -62,7 +62,6 @@
#define CONFIG_PRIVATE
#include "or/or.h"
#include "or/bridges.h"
-#include "common/compat.h"
#include "or/addressmap.h"
#include "or/channel.h"
#include "or/circuitbuild.h"
diff --git a/src/or/directory.c b/src/or/directory.c
index 4e34af305..763666d2f 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -17,7 +17,6 @@
#include "or/consdiff.h"
#include "or/consdiffmgr.h"
#include "or/control.h"
-#include "common/compat.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "or/directory.h"
diff --git a/src/or/keypin.c b/src/or/keypin.c
index 8100f3b73..34cf64f5c 100644
--- a/src/or/keypin.c
+++ b/src/or/keypin.c
@@ -11,7 +11,6 @@
#define KEYPIN_PRIVATE
#include "orconfig.h"
-#include "common/compat.h"
#include "lib/crypt_ops/crypto_digest.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/ctime/di_ops.h"
diff --git a/src/or/protover.h b/src/or/protover.h
index aab311e96..7319d2f8c 100644
--- a/src/or/protover.h
+++ b/src/or/protover.h
@@ -9,6 +9,9 @@
#ifndef TOR_PROTOVER_H
#define TOR_PROTOVER_H
+#include <stdbool.h>
+#include "lib/cc/torint.h"
+#include "lib/testsupport/testsupport.h"
struct smartlist_t;
/** The first version of Tor that included "proto" entries in its
diff --git a/src/or/torcert.c b/src/or/torcert.c
index e307dd1b5..785132c17 100644
--- a/src/or/torcert.c
+++ b/src/or/torcert.c
@@ -32,7 +32,6 @@
#include "trunnel/ed25519_cert.h"
#include "lib/log/torlog.h"
#include "common/util.h"
-#include "common/compat.h"
#include "trunnel/link_handshake.h"
#include "or/or_handshake_certs_st.h"
diff --git a/src/test/test-memwipe.c b/src/test/test-memwipe.c
index 16bb017c8..552cbbc55 100644
--- a/src/test/test-memwipe.c
+++ b/src/test/test-memwipe.c
@@ -8,7 +8,6 @@
#include <stdlib.h>
#include "lib/crypt_ops/crypto_util.h"
-#include "common/compat.h"
#include "common/util.h"
static unsigned fill_a_buffer_memset(void) __attribute__((noinline));
diff --git a/src/test/test-timers.c b/src/test/test-timers.c
index 70f07fba4..f6ff9a5f8 100644
--- a/src/test/test-timers.c
+++ b/src/test/test-timers.c
@@ -7,7 +7,6 @@
#include <stdio.h>
#include <string.h>
-#include "common/compat.h"
#include "common/compat_libevent.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "common/timers.h"
diff --git a/src/test/test.h b/src/test/test.h
index 9abd46008..c231bc5f8 100644
--- a/src/test/test.h
+++ b/src/test/test.h
@@ -13,7 +13,6 @@
#define DEBUG_SMARTLIST 1
-#include "common/compat.h"
#include "tinytest.h"
#define TT_EXIT_TEST_FUNCTION STMT_BEGIN goto done; STMT_END
#include "tinytest_macros.h"
diff --git a/src/test/test_crypto_openssl.c b/src/test/test_crypto_openssl.c
index a01de18a6..d443ba6fd 100644
--- a/src/test/test_crypto_openssl.c
+++ b/src/test/test_crypto_openssl.c
@@ -10,7 +10,6 @@
#include "lib/crypt_ops/crypto_rand.h"
#include "common/util.h"
#include "lib/encoding/binascii.h"
-#include "common/compat.h"
#include "test/test.h"
#include <openssl/evp.h>
diff --git a/src/test/test_hs_ntor_cl.c b/src/test/test_hs_ntor_cl.c
index 9b59f0ddb..5475f3b38 100644
--- a/src/test/test_hs_ntor_cl.c
+++ b/src/test/test_hs_ntor_cl.c
@@ -15,7 +15,6 @@
#define ONION_NTOR_PRIVATE
#include "or/or.h"
#include "common/util.h"
-#include "common/compat.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "or/hs_ntor.h"
diff --git a/src/test/test_link_handshake.c b/src/test/test_link_handshake.c
index 2650caf95..ffb6c47b1 100644
--- a/src/test/test_link_handshake.c
+++ b/src/test/test_link_handshake.c
@@ -8,8 +8,6 @@
#define TOR_CHANNEL_INTERNAL_
#define TORTLS_PRIVATE
-#include "common/compat.h"
-
#include "or/or.h"
#include "or/config.h"
#include "or/connection.h"
@@ -1581,4 +1579,3 @@ struct testcase_t link_handshake_tests[] = {
END_OF_TESTCASES
};
-
diff --git a/src/test/test_ntor_cl.c b/src/test/test_ntor_cl.c
index a10cd7e9b..75d5ccc12 100644
--- a/src/test/test_ntor_cl.c
+++ b/src/test/test_ntor_cl.c
@@ -8,7 +8,6 @@
#define ONION_NTOR_PRIVATE
#include "or/or.h"
#include "common/util.h"
-#include "common/compat.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "or/onion_ntor.h"
diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c
index f1b9b99f5..b45673468 100644
--- a/src/test/test_tortls.c
+++ b/src/test/test_tortls.c
@@ -11,7 +11,7 @@
#endif
#include <math.h>
-#include "common/compat.h"
+#include "lib/cc/compat_compiler.h"
/* Some versions of OpenSSL declare SSL_get_selected_srtp_profile twice in
* srtp.h. Suppress the GCC warning so we can build with -Wredundant-decl. */
@@ -2839,4 +2839,3 @@ struct testcase_t tortls_tests[] = {
LOCAL_TEST_CASE(context_init_one, 0),
END_OF_TESTCASES
};
-
More information about the tor-commits
mailing list