Remove util.h

Inline its contents (which were all includes) into or.h, and some of
its contents into other places that didn't include or.h at all.
This commit is contained in:
Nick Mathewson
2018-07-05 15:04:18 -04:00
parent 0adcfbc7c8
commit 4593829861
31 changed files with 83 additions and 99 deletions
-1
View File
@@ -9,7 +9,6 @@
#include "lib/crypt_ops/crypto_ed25519.h"
#include "or/hs_descriptor.h"
#include "or/routerparse.h"
#include "common/util.h"
#include "test/fuzz/fuzzing.h"
+5 -4
View File
@@ -2,14 +2,16 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
#include "lib/crypt_ops/crypto_util.h"
#include "lib/intmath/cmp.h"
#include "lib/malloc/util_malloc.h"
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include "lib/crypt_ops/crypto_util.h"
#include "common/util.h"
static unsigned fill_a_buffer_memset(void) __attribute__((noinline));
static unsigned fill_a_buffer_memwipe(void) __attribute__((noinline));
static unsigned fill_a_buffer_nothing(void) __attribute__((noinline));
@@ -214,4 +216,3 @@ main(int argc, char **argv)
return 0;
}
}
+4 -3
View File
@@ -8,9 +8,11 @@
#include <string.h>
#include "common/compat_libevent.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "common/timers.h"
#include "common/util.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/log/util_bug.h"
#include "lib/time/compat_time.h"
#include "lib/wallclock/timeval.h"
#define N_TIMERS 1000
#define MAX_DURATION 30
@@ -138,4 +140,3 @@ main(int argc, char **argv)
timers_shutdown();
return ret;
}
-1
View File
@@ -16,7 +16,6 @@
#include "or/bridges.h"
#include "or/config.h"
#include "or/transports.h"
#include "common/util.h"
/* Test suite stuff */
#include "test/test.h"
-1
View File
@@ -8,7 +8,6 @@
/* To prevent 'assert' from going away. */
#undef TOR_COVERAGE
#include "or/or.h"
#include "common/util.h"
#include "lib/err/backtrace.h"
#include "lib/log/torlog.h"
-1
View File
@@ -12,7 +12,6 @@
#include "or/config.h"
#include "test/test.h"
#include "common/util.h"
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
-1
View File
@@ -19,7 +19,6 @@
#include "or/connection.h"
#include "or/connection_edge.h"
#include "test/test.h"
#include "common/util.h"
#include "or/connection_or.h"
#include "or/control.h"
#include "or/cpuworker.h"
-1
View File
@@ -9,7 +9,6 @@
#include "or/or.h"
#include "test/test.h"
#include "lib/crypt_ops/aes.h"
#include "common/util.h"
#include "siphash.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_dh.h"
+2 -3
View File
@@ -7,14 +7,14 @@
#define CRYPTO_RAND_PRIVATE
#include "lib/crypt_ops/compat_openssl.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "common/util.h"
#include "lib/encoding/binascii.h"
#include "test/test.h"
#include <openssl/evp.h>
#include <openssl/rand.h>
#include "lib/crypt_ops/compat_openssl.h"
#include <string.h>
/* Test for rectifying openssl RAND engine. */
static void
@@ -103,4 +103,3 @@ struct testcase_t crypto_openssl_tests[] = {
TT_FORK, NULL, NULL },
END_OF_TESTCASES
};
-1
View File
@@ -28,7 +28,6 @@
#include "or/routerparse.h"
#include "or/routerset.h"
#include "or/statefile.h"
#include "common/util.h"
#include "or/cpath_build_state_st.h"
#include "or/crypt_path_st.h"
-1
View File
@@ -10,7 +10,6 @@
#include "or/config.h"
#include "or/dirserv.h"
#include "or/entrynodes.h"
#include "common/util.h"
#include "or/routerparse.h"
#include "or/networkstatus.h"
+3 -2
View File
@@ -4,8 +4,10 @@
#include "orconfig.h"
#include "test/test.h"
#include "common/util.h"
#include "lib/container/handles.h"
#include "lib/log/util_bug.h"
#include <stdio.h>
typedef struct demo_t {
HANDLE_ENTRY(demo, demo_t);
@@ -94,4 +96,3 @@ struct testcase_t handle_tests[] = {
HANDLE_TEST(basic, 0),
END_OF_TESTCASES
};
-1
View File
@@ -31,7 +31,6 @@
#include "or/statefile.h"
#include "or/circuitlist.h"
#include "or/dirauth/shared_random.h"
#include "common/util.h"
#include "or/voting_schedule.h"
#include "or/microdesc_st.h"
-1
View File
@@ -14,7 +14,6 @@
#define ONION_NTOR_PRIVATE
#include "or/or.h"
#include "common/util.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_ed25519.h"
-1
View File
@@ -5,7 +5,6 @@
#define KEYPIN_PRIVATE
#include "or/or.h"
#include "or/keypin.h"
#include "common/util.h"
#include "test/test.h"
-1
View File
@@ -7,7 +7,6 @@
#define ONION_NTOR_PRIVATE
#include "or/or.h"
#include "common/util.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "or/onion_ntor.h"
-1
View File
@@ -15,7 +15,6 @@
#include "or/control.h"
#include "or/transports.h"
#include "or/circuitbuild.h"
#include "common/util.h"
#include "or/statefile.h"
#include "test/test.h"
#include "lib/process/subprocess.h"
-1
View File
@@ -9,7 +9,6 @@
#include "or/config.h"
#include "or/router.h"
#include "or/routerkeys.h"
#include "common/util.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_format.h"
#include "or/torcert.h"
+6 -2
View File
@@ -6,13 +6,17 @@
#include "orconfig.h"
#define UTIL_PRIVATE
#define SUBPROCESS_PRIVATE
#include "common/util.h"
#include "lib/process/waitpid.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/log/torlog.h"
#include "lib/process/subprocess.h"
#include "lib/process/waitpid.h"
#include "lib/string/printf.h"
#include "lib/time/compat_time.h"
#include "test/test.h"
#include <errno.h>
#include <string.h>
#ifndef BUILDDIR
#define BUILDDIR "."
#endif