aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-20 09:35:05 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-20 09:35:05 -0400
commit0dab29ce1069c2ebec22a75669aa8242fdc15882 (patch)
treec4db0ff4bef4870ac94c1d38135e4c0bf94d47d9 /src/common
parent257b28077676f6d8a3c0d2beef37a9414c747de9 (diff)
downloadtor-0dab29ce1069c2ebec22a75669aa8242fdc15882.tar.gz
tor-0dab29ce1069c2ebec22a75669aa8242fdc15882.zip
Run rectify_include_paths.py
Diffstat (limited to 'src/common')
-rw-r--r--src/common/address.c14
-rw-r--r--src/common/address.h6
-rw-r--r--src/common/address_set.c12
-rw-r--r--src/common/address_set.h2
-rw-r--r--src/common/aes.c14
-rw-r--r--src/common/backtrace.c8
-rw-r--r--src/common/buffers.c12
-rw-r--r--src/common/buffers.h6
-rw-r--r--src/common/buffers_tls.c16
-rw-r--r--src/common/compat.c12
-rw-r--r--src/common/compat.h8
-rw-r--r--src/common/compat_libevent.c10
-rw-r--r--src/common/compat_libevent.h2
-rw-r--r--src/common/compat_openssl.h2
-rw-r--r--src/common/compat_pthreads.c6
-rw-r--r--src/common/compat_threads.c8
-rw-r--r--src/common/compat_threads.h4
-rw-r--r--src/common/compat_time.c8
-rw-r--r--src/common/compat_winthreads.c8
-rw-r--r--src/common/compress.c16
-rw-r--r--src/common/compress_lzma.c8
-rw-r--r--src/common/compress_none.c8
-rw-r--r--src/common/compress_zlib.c8
-rw-r--r--src/common/compress_zstd.c8
-rw-r--r--src/common/confline.c10
-rw-r--r--src/common/confline.h2
-rw-r--r--src/common/container.c10
-rw-r--r--src/common/container.h2
-rw-r--r--src/common/crypto.c36
-rw-r--r--src/common/crypto.h8
-rw-r--r--src/common/crypto_curve25519.c16
-rw-r--r--src/common/crypto_curve25519.h8
-rw-r--r--src/common/crypto_dh.c12
-rw-r--r--src/common/crypto_dh.h2
-rw-r--r--src/common/crypto_digest.c10
-rw-r--r--src/common/crypto_digest.h4
-rw-r--r--src/common/crypto_ed25519.c18
-rw-r--r--src/common/crypto_ed25519.h8
-rw-r--r--src/common/crypto_format.c18
-rw-r--r--src/common/crypto_format.h6
-rw-r--r--src/common/crypto_hkdf.c6
-rw-r--r--src/common/crypto_hkdf.h2
-rw-r--r--src/common/crypto_openssl_mgt.c4
-rw-r--r--src/common/crypto_openssl_mgt.h2
-rw-r--r--src/common/crypto_pwbox.c18
-rw-r--r--src/common/crypto_pwbox.h2
-rw-r--r--src/common/crypto_rand.c20
-rw-r--r--src/common/crypto_rand.h4
-rw-r--r--src/common/crypto_rsa.c22
-rw-r--r--src/common/crypto_rsa.h12
-rw-r--r--src/common/crypto_s2k.c16
-rw-r--r--src/common/crypto_s2k.h2
-rw-r--r--src/common/crypto_util.c6
-rw-r--r--src/common/crypto_util.h2
-rw-r--r--src/common/di_ops.c6
-rw-r--r--src/common/di_ops.h2
-rw-r--r--src/common/handles.h2
-rw-r--r--src/common/log.c8
-rw-r--r--src/common/memarea.c10
-rw-r--r--src/common/procmon.c4
-rw-r--r--src/common/procmon.h6
-rw-r--r--src/common/pubsub.c4
-rw-r--r--src/common/pubsub.h2
-rw-r--r--src/common/sandbox.c12
-rw-r--r--src/common/sandbox.h2
-rw-r--r--src/common/storagedir.c16
-rw-r--r--src/common/timers.c10
-rw-r--r--src/common/timers.h2
-rw-r--r--src/common/token_bucket.c4
-rw-r--r--src/common/token_bucket.h4
-rw-r--r--src/common/torlog.h4
-rw-r--r--src/common/tortls.c18
-rw-r--r--src/common/tortls.h8
-rw-r--r--src/common/util.c20
-rw-r--r--src/common/util.h10
-rw-r--r--src/common/util_bug.c8
-rw-r--r--src/common/util_bug.h4
-rw-r--r--src/common/util_format.c8
-rw-r--r--src/common/util_format.h4
-rw-r--r--src/common/util_process.c8
-rw-r--r--src/common/workqueue.c14
-rw-r--r--src/common/workqueue.h2
82 files changed, 348 insertions, 348 deletions
diff --git a/src/common/address.c b/src/common/address.c
index 0ccf73d48e..2e8b5fc9f5 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -35,13 +35,13 @@
#include <iphlpapi.h>
#endif /* defined(_WIN32) */
-#include "compat.h"
-#include "util.h"
-#include "util_format.h"
-#include "address.h"
-#include "torlog.h"
-#include "container.h"
-#include "sandbox.h"
+#include "common/compat.h"
+#include "common/util.h"
+#include "common/util_format.h"
+#include "common/address.h"
+#include "common/torlog.h"
+#include "common/container.h"
+#include "common/sandbox.h"
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
diff --git a/src/common/address.h b/src/common/address.h
index 8e9e251753..2c9c620c2a 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -13,9 +13,9 @@
//#include <sys/sockio.h>
#include "orconfig.h"
-#include "torint.h"
-#include "compat.h"
-#include "container.h"
+#include "common/torint.h"
+#include "common/compat.h"
+#include "common/container.h"
#ifdef ADDRESS_PRIVATE
diff --git a/src/common/address_set.c b/src/common/address_set.c
index 16ae394035..763db64280 100644
--- a/src/common/address_set.c
+++ b/src/common/address_set.c
@@ -11,12 +11,12 @@
**/
#include "orconfig.h"
-#include "address_set.h"
-#include "address.h"
-#include "compat.h"
-#include "container.h"
-#include "crypto_rand.h"
-#include "util.h"
+#include "common/address_set.h"
+#include "common/address.h"
+#include "common/compat.h"
+#include "common/container.h"
+#include "common/crypto_rand.h"
+#include "common/util.h"
#include "siphash.h"
/** How many 64-bit siphash values to extract per address */
diff --git a/src/common/address_set.h b/src/common/address_set.h
index dc16cfe5f0..f4986c9b02 100644
--- a/src/common/address_set.h
+++ b/src/common/address_set.h
@@ -14,7 +14,7 @@
#define TOR_ADDRESS_SET_H
#include "orconfig.h"
-#include "torint.h"
+#include "common/torint.h"
/**
* An address_set_t represents a set of tor_addr_t values. The implementation
diff --git a/src/common/aes.c b/src/common/aes.c
index 5217ad250f..c0851c5421 100644
--- a/src/common/aes.c
+++ b/src/common/aes.c
@@ -16,9 +16,9 @@
#include <ws2tcpip.h>
#endif
-#include "compat_openssl.h"
+#include "common/compat_openssl.h"
#include <openssl/opensslv.h>
-#include "crypto_openssl_mgt.h"
+#include "common/crypto_openssl_mgt.h"
#if OPENSSL_VERSION_NUMBER < OPENSSL_V_SERIES(1,0,0)
#error "We require OpenSSL >= 1.0.0"
@@ -36,11 +36,11 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
-#include "compat.h"
-#include "aes.h"
-#include "util.h"
-#include "torlog.h"
-#include "di_ops.h"
+#include "common/compat.h"
+#include "common/aes.h"
+#include "common/util.h"
+#include "common/torlog.h"
+#include "common/di_ops.h"
#ifdef ANDROID
/* Android's OpenSSL seems to have removed all of its Engine support. */
diff --git a/src/common/backtrace.c b/src/common/backtrace.c
index e33c02ea4e..c3c0b77ab2 100644
--- a/src/common/backtrace.c
+++ b/src/common/backtrace.c
@@ -14,9 +14,9 @@
*/
#include "orconfig.h"
-#include "compat.h"
-#include "util.h"
-#include "torlog.h"
+#include "common/compat.h"
+#include "common/util.h"
+#include "common/torlog.h"
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
@@ -40,7 +40,7 @@
#endif /* defined(HAVE_CYGWIN_SIGNAL_H) || ... */
#define EXPOSE_CLEAN_BACKTRACE
-#include "backtrace.h"
+#include "common/backtrace.h"
#if defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && \
defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION)
diff --git a/src/common/buffers.c b/src/common/buffers.c
index d21a0db75d..997bbdcccb 100644
--- a/src/common/buffers.c
+++ b/src/common/buffers.c
@@ -21,12 +21,12 @@
#define BUFFERS_PRIVATE
#include "orconfig.h"
#include <stddef.h>
-#include "buffers.h"
-#include "compat.h"
-#include "compress.h"
-#include "util.h"
-#include "torint.h"
-#include "torlog.h"
+#include "common/buffers.h"
+#include "common/compat.h"
+#include "common/compress.h"
+#include "common/util.h"
+#include "common/torint.h"
+#include "common/torlog.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/src/common/buffers.h b/src/common/buffers.h
index f78f7b2895..5cd9d3ec67 100644
--- a/src/common/buffers.h
+++ b/src/common/buffers.h
@@ -12,9 +12,9 @@
#ifndef TOR_BUFFERS_H
#define TOR_BUFFERS_H
-#include "compat.h"
-#include "torint.h"
-#include "testsupport.h"
+#include "common/compat.h"
+#include "common/torint.h"
+#include "common/testsupport.h"
typedef struct buf_t buf_t;
diff --git a/src/common/buffers_tls.c b/src/common/buffers_tls.c
index c947b79ee8..dfc8e44b98 100644
--- a/src/common/buffers_tls.c
+++ b/src/common/buffers_tls.c
@@ -7,14 +7,14 @@
#define BUFFERS_PRIVATE
#include "orconfig.h"
#include <stddef.h>
-#include "buffers.h"
-#include "buffers_tls.h"
-#include "compat.h"
-#include "compress.h"
-#include "util.h"
-#include "torint.h"
-#include "torlog.h"
-#include "tortls.h"
+#include "common/buffers.h"
+#include "common/buffers_tls.h"
+#include "common/compat.h"
+#include "common/compress.h"
+#include "common/util.h"
+#include "common/torint.h"
+#include "common/torlog.h"
+#include "common/tortls.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/src/common/compat.c b/src/common/compat.c
index 9f412e8fa6..9b1a4d860f 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -13,7 +13,7 @@
**/
#define COMPAT_PRIVATE
-#include "compat.h"
+#include "common/compat.h"
#ifdef _WIN32
#include <winsock2.h>
@@ -125,11 +125,11 @@ SecureZeroMemory(PVOID ptr, SIZE_T cnt)
#include <sys/file.h>
#endif
-#include "torlog.h"
-#include "util.h"
-#include "container.h"
-#include "address.h"
-#include "sandbox.h"
+#include "common/torlog.h"
+#include "common/util.h"
+#include "common/container.h"
+#include "common/address.h"
+#include "common/sandbox.h"
/* Inline the strl functions if the platform doesn't have them. */
#ifndef HAVE_STRLCPY
diff --git a/src/common/compat.h b/src/common/compat.h
index fc0ce052c4..3b451dd10b 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -14,8 +14,8 @@
#define SIO_IDEAL_SEND_BACKLOG_QUERY 0x4004747b
#endif
#endif
-#include "torint.h"
-#include "testsupport.h"
+#include "common/torint.h"
+#include "common/testsupport.h"
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
@@ -45,7 +45,7 @@
#include <netinet6/in6.h>
#endif
-#include "compat_time.h"
+#include "common/compat_time.h"
#if defined(__has_feature)
# if __has_feature(address_sanitizer)
@@ -751,7 +751,7 @@ STATIC int tor_ersatz_socketpair(int family, int type, int protocol,
ssize_t tor_getpass(const char *prompt, char *output, size_t buflen);
/* This needs some of the declarations above so we include it here. */
-#include "compat_threads.h"
+#include "common/compat_threads.h"
#endif /* !defined(TOR_COMPAT_H) */
diff --git a/src/common/compat_libevent.c b/src/common/compat_libevent.c
index 4262f58e87..c99de1ac34 100644
--- a/src/common/compat_libevent.c
+++ b/src/common/compat_libevent.c
@@ -7,14 +7,14 @@
*/
#include "orconfig.h"
-#include "compat.h"
+#include "common/compat.h"
#define COMPAT_LIBEVENT_PRIVATE
-#include "compat_libevent.h"
+#include "common/compat_libevent.h"
-#include "crypto_rand.h"
+#include "common/crypto_rand.h"
-#include "util.h"
-#include "torlog.h"
+#include "common/util.h"
+#include "common/torlog.h"
#include <event2/event.h>
#include <event2/thread.h>
diff --git a/src/common/compat_libevent.h b/src/common/compat_libevent.h
index b28acda3b6..76a074d93a 100644
--- a/src/common/compat_libevent.h
+++ b/src/common/compat_libevent.h
@@ -5,7 +5,7 @@
#define TOR_COMPAT_LIBEVENT_H
#include "orconfig.h"
-#include "testsupport.h"
+#include "common/testsupport.h"
void configure_libevent_logging(void);
void suppress_libevent_log_msg(const char *msg);
diff --git a/src/common/compat_openssl.h b/src/common/compat_openssl.h
index c7f51173bf..a94b264927 100644
--- a/src/common/compat_openssl.h
+++ b/src/common/compat_openssl.h
@@ -8,7 +8,7 @@
#define TOR_COMPAT_OPENSSL_H
#include <openssl/opensslv.h>
-#include "crypto_openssl_mgt.h"
+#include "common/crypto_openssl_mgt.h"
/**
* \file compat_openssl.h
diff --git a/src/common/compat_pthreads.c b/src/common/compat_pthreads.c
index 2e7d3d54c9..6d5f846778 100644
--- a/src/common/compat_pthreads.c
+++ b/src/common/compat_pthreads.c
@@ -15,9 +15,9 @@
#include <signal.h>
#include <time.h>
-#include "compat.h"
-#include "torlog.h"
-#include "util.h"
+#include "common/compat.h"
+#include "common/torlog.h"
+#include "common/util.h"
/** Wraps a void (*)(void*) function and its argument so we can
* invoke them in a way pthreads would expect.
diff --git a/src/common/compat_threads.c b/src/common/compat_threads.c
index 6d33d3e244..250ac48c0f 100644
--- a/src/common/compat_threads.c
+++ b/src/common/compat_threads.c
@@ -13,11 +13,11 @@
#include "orconfig.h"
#include <stdlib.h>
-#include "compat.h"
-#include "compat_threads.h"
+#include "common/compat.h"
+#include "common/compat_threads.h"
-#include "util.h"
-#include "torlog.h"
+#include "common/util.h"
+#include "common/torlog.h"
#ifdef HAVE_SYS_EVENTFD_H
#include <sys/eventfd.h>
diff --git a/src/common/compat_threads.h b/src/common/compat_threads.h
index 2d70cf7a3a..5d3883043d 100644
--- a/src/common/compat_threads.h
+++ b/src/common/compat_threads.h
@@ -7,8 +7,8 @@
#define TOR_COMPAT_THREADS_H
#include "orconfig.h"
-#include "torint.h"
-#include "testsupport.h"
+#include "common/torint.h"
+#include "common/testsupport.h"
#if defined(HAVE_PTHREAD_H) && !defined(_WIN32)
#include <pthread.h>
diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index ef72003de1..ed0a1550fa 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -10,7 +10,7 @@
**/
#define COMPAT_TIME_PRIVATE
-#include "compat.h"
+#include "common/compat.h"
#ifdef _WIN32
#include <winsock2.h>
@@ -34,9 +34,9 @@
#include <mach/mach_time.h>
#endif
-#include "torlog.h"
-#include "util.h"
-#include "container.h"
+#include "common/torlog.h"
+#include "common/util.h"
+#include "common/container.h"
#ifndef HAVE_GETTIMEOFDAY
#ifdef HAVE_FTIME
diff --git a/src/common/compat_winthreads.c b/src/common/compat_winthreads.c
index 6908f0ddfe..9d07e1798f 100644
--- a/src/common/compat_winthreads.c
+++ b/src/common/compat_winthreads.c
@@ -12,12 +12,12 @@
#ifdef _WIN32
-#include "compat.h"
+#include "common/compat.h"
#include <windows.h>
#include <process.h>
-#include "util.h"
-#include "container.h"
-#include "torlog.h"
+#include "common/util.h"
+#include "common/container.h"
+#include "common/torlog.h"
/* This value is more or less total cargo-cult */
#define SPIN_COUNT 2000
diff --git a/src/common/compress.c b/src/common/compress.c
index 8164448253..204529a54d 100644
--- a/src/common/compress.c
+++ b/src/common/compress.c
@@ -14,19 +14,19 @@
#include <stdio.h>
#include <assert.h>
#include <string.h>
-#include "torint.h"
+#include "common/torint.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#include "util.h"
-#include "torlog.h"
-#include "compress.h"
-#include "compress_lzma.h"
-#include "compress_none.h"
-#include "compress_zlib.h"
-#include "compress_zstd.h"
+#include "common/util.h"
+#include "common/torlog.h"
+#include "common/compress.h"
+#include "common/compress_lzma.h"
+#include "common/compress_none.h"
+#include "common/compress_zlib.h"
+#include "common/compress_zstd.h"
/** Total number of bytes allocated for compression state overhead. */
static atomic_counter_t total_compress_allocation;
diff --git a/src/common/compress_lzma.c b/src/common/compress_lzma.c
index e9d0e9e51b..363dc1fb92 100644
--- a/src/common/compress_lzma.c
+++ b/src/common/compress_lzma.c
@@ -13,10 +13,10 @@
#include "orconfig.h"
-#include "util.h"
-#include "torlog.h"
-#include "compress.h"
-#include "compress_lzma.h"
+#include "common/util.h"
+#include "common/torlog.h"
+#include "common/compress.h"
+#include "common/compress_lzma.h"
#ifdef HAVE_LZMA
#include <lzma.h>
diff --git a/src/common/compress_none.c b/src/common/compress_none.c
index 5240a686cc..7e67046d34 100644
--- a/src/common/compress_none.c
+++ b/src/common/compress_none.c
@@ -16,10 +16,10 @@
#include "orconfig.h"
-#include "util.h"
-#include "torlog.h"
-#include "compress.h"
-#include "compress_none.h"
+#include "common/util.h"
+#include "common/torlog.h"
+#include "common/compress.h"
+#include "common/compress_none.h"
/** Transfer some bytes using the identity transformation. Read up to
* *<b>in_len</b> bytes from *<b>in</b>, and write up to *<b>out_len</b> bytes
diff --git a/src/common/compress_zlib.c b/src/common/compress_zlib.c
index d79cc41ad1..663e27f794 100644
--- a/src/common/compress_zlib.c
+++ b/src/common/compress_zlib.c
@@ -13,10 +13,10 @@
#include "orconfig.h"
-#include "util.h"
-#include "torlog.h"
-#include "compress.h"
-#include "compress_zlib.h"
+#include "common/util.h"
+#include "common/torlog.h"
+#include "common/compress.h"
+#include "common/compress_zlib.h"
/* zlib 1.2.4 and 1.2.5 do some "clever" things with macros. Instead of
saying "(defined(FOO) ? FOO : 0)" they like to say "FOO-0", on the theory
diff --git a/src/common/compress_zstd.c b/src/common/compress_zstd.c
index f1fb18408a..dc0dcdec93 100644
--- a/src/common/compress_zstd.c
+++ b/src/common/compress_zstd.c
@@ -13,10 +13,10 @@
#include "orconfig.h"
-#include "util.h"
-#include "torlog.h"
-#include "compress.h"
-#include "compress_zstd.h"
+#include "common/util.h"
+#include "common/torlog.h"
+#include "common/compress.h"
+#include "common/compress_zstd.h"
#ifdef ENABLE_ZSTD_ADVANCED_APIS
/* This is a lie, but we make sure it doesn't get us in trouble by wrapping
diff --git a/src/common/confline.c b/src/common/confline.c
index 3ba2a288f9..2ea2e9c3b8 100644
--- a/src/common/confline.c
+++ b/src/common/confline.c
@@ -4,11 +4,11 @@
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "compat.h"
-#include "confline.h"
-#include "torlog.h"
-#include "util.h"
-#include "container.h"
+#include "common/compat.h"
+#include "common/confline.h"
+#include "common/torlog.h"
+#include "common/util.h"
+#include "common/container.h"
static int config_get_lines_aux(const char *string, config_line_t **result,
int extended, int allow_include,
diff --git a/src/common/confline.h b/src/common/confline.h
index 57585792d6..4cc8286fc3 100644
--- a/src/common/confline.h
+++ b/src/common/confline.h
@@ -7,7 +7,7 @@
#ifndef TOR_CONFLINE_H
#define TOR_CONFLINE_H
-#include "container.h"
+#include "common/container.h"
/** Ordinary configuration line. */
#define CONFIG_LINE_NORMAL 0
diff --git a/src/common/container.c b/src/common/container.c
index fa9315eec3..03324c8730 100644
--- a/src/common/container.c
+++ b/src/common/container.c
@@ -11,11 +11,11 @@
* a digest-to-void* map.
**/
-#include "compat.h"
-#include "util.h"
-#include "torlog.h"
-#include "container.h"
-#include "crypto_digest.h"
+#include "common/compat.h"
+#include "common/util.h"
+#include "common/torlog.h"
+#include "common/container.h"
+#include "common/crypto_digest.h"
#include <stdlib.h>
#include <string.h>
diff --git a/src/common/container.h b/src/common/container.h
index 68c270c43c..372fa6640c 100644
--- a/src/common/container.h
+++ b/src/common/container.h
@@ -6,7 +6,7 @@
#ifndef TOR_CONTAINER_H
#define TOR_CONTAINER_H
-#include "util.h"
+#include "common/util.h"
#include "siphash.h"
/** A resizeable list of pointers, with associated helpful functionality.
diff --git a/src/common/crypto.c b/src/common/crypto.c
index f343285875..14129086eb 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -23,16 +23,16 @@
#endif /* defined(_WIN32) */
#define CRYPTO_PRIVATE
-#include "compat_openssl.h"
-#include "crypto.h"
-#include "crypto_curve25519.h"
-#include "crypto_digest.h"
-#include "crypto_dh.h"
-#include "crypto_ed25519.h"
-#include "crypto_format.h"
-#include "crypto_rand.h"
-#include "crypto_rsa.h"
-#include "crypto_util.h"
+#include "common/compat_openssl.h"
+#include "common/crypto.h"
+#include "common/crypto_curve25519.h"
+#include "common/crypto_digest.h"
+#include "common/crypto_dh.h"
+#include "common/crypto_ed25519.h"
+#include "common/crypto_format.h"
+#include "common/crypto_rand.h"
+#include "common/crypto_rsa.h"
+#include "common/crypto_util.h"
DISABLE_GCC_WARNING(redundant-decls)
@@ -62,14 +62,14 @@ ENABLE_GCC_WARNING(redundant-decls)
#include <unistd.h>
#endif
-#include "torlog.h"
-#include "torint.h"
-#include "aes.h"
-#include "util.h"
-#include "container.h"
-#include "compat.h"
-#include "sandbox.h"
-#include "util_format.h"
+#include "common/torlog.h"
+#include "common/torint.h"
+#include "common/aes.h"
+#include "common/util.h"
+#include "common/container.h"
+#include "common/compat.h"
+#include "common/sandbox.h"
+#include "common/util_format.h"
#include "keccak-tiny/keccak-tiny.h"
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 7ff11f394c..1a88a3d2f6 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -16,10 +16,10 @@
#include "orconfig.h"
#include <stdio.h>
-#include "torint.h"
-#include "compat.h"
-#include "util.h"
-#include "crypto_rsa.h"
+#include "common/torint.h"
+#include "common/compat.h"
+#include "common/util.h"
+#include "common/crypto_rsa.h"
/** Length of our symmetric cipher's keys of 128-bit. */
#define CIPHER_KEY_LEN 16
diff --git a/src/common/crypto_curve25519.c b/src/common/crypto_curve25519.c
index d4d9609f62..f28cebb887 100644
--- a/src/common/crypto_curve25519.c
+++ b/src/common/crypto_curve25519.c
@@ -20,14 +20,14 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#include "container.h"
-#include "crypto_curve25519.h"
-#include "crypto_digest.h"
-#include "crypto_format.h"
-#include "crypto_rand.h"
-#include "crypto_util.h"
-#include "util.h"
-#include "torlog.h"
+#include "common/container.h"
+#include "common/crypto_curve25519.h"
+#include "common/crypto_digest.h"
+#include "common/crypto_format.h"
+#include "common/crypto_rand.h"
+#include "common/crypto_util.h"
+#include "common/util.h"
+#include "common/torlog.h"
#include "ed25519/donna/ed25519_donna_tor.h"
diff --git a/src/common/crypto_curve25519.h b/src/common/crypto_curve25519.h
index 462ec85f9d..96d2e0e072 100644
--- a/src/common/crypto_curve25519.h
+++ b/src/common/crypto_curve25519.h
@@ -4,10 +4,10 @@
#ifndef TOR_CRYPTO_CURVE25519_H
#define TOR_CRYPTO_CURVE25519_H
-#include "testsupport.h"
-#include "torint.h"
-#include "crypto_digest.h"
-#include "crypto_openssl_mgt.h"
+#include "common/testsupport.h"
+#include "common/torint.h"
+#include "common/crypto_digest.h"
+#include "common/crypto_openssl_mgt.h"
/** Length of a curve25519 public key when encoded. */
#define CURVE25519_PUBKEY_LEN 32
diff --git a/src/common/crypto_dh.c b/src/common/crypto_dh.c
index 0dcdfa205b..4c6b03cee8 100644
--- a/src/common/crypto_dh.c
+++ b/src/common/crypto_dh.c
@@ -9,11 +9,11 @@
* \brief Block of functions related with DH utilities and operations.
**/
-#include "compat_openssl.h"
-#include "crypto_dh.h"
-#include "crypto_digest.h"
-#include "crypto_hkdf.h"
-#include "crypto_util.h"
+#include "common/compat_openssl.h"
+#include "common/crypto_dh.h"
+#include "common/crypto_digest.h"
+#include "common/crypto_hkdf.h"
+#include "common/crypto_util.h"
DISABLE_GCC_WARNING(redundant-decls)
@@ -21,7 +21,7 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
-#include "torlog.h"
+#include "common/torlog.h"
/** A structure to hold the first half (x, g^x) of a Diffie-Hellman handshake
* while we're waiting for the second.*/
diff --git a/src/common/crypto_dh.h b/src/common/crypto_dh.h
index 540ec6ce12..1e77acc011 100644
--- a/src/common/crypto_dh.h
+++ b/src/common/crypto_dh.h
@@ -13,7 +13,7 @@
#ifndef TOR_CRYPTO_DH_H
#define TOR_CRYPTO_DH_H
-#include "util.h"
+#include "common/util.h"
/** Length of our DH keys. */
#define DH_BYTES (1024/8)
diff --git a/src/common/crypto_digest.c b/src/common/crypto_digest.c
index 41f3691a3d..708fbf9be6 100644
--- a/src/common/crypto_digest.c
+++ b/src/common/crypto_digest.c
@@ -10,11 +10,11 @@
* operations.
**/
-#include "container.h"
-#include "crypto_digest.h"
-#include "crypto_openssl_mgt.h"
-#include "crypto_util.h"
-#include "torlog.h"
+#include "common/container.h"
+#include "common/crypto_digest.h"
+#include "common/crypto_openssl_mgt.h"
+#include "common/crypto_util.h"
+#include "common/torlog.h"
#include "keccak-tiny/keccak-tiny.h"
diff --git a/src/common/crypto_digest.h b/src/common/crypto_digest.h
index 631e6e589a..25ca5ceda7 100644
--- a/src/common/crypto_digest.h
+++ b/src/common/crypto_digest.h
@@ -15,8 +15,8 @@
#include <stdio.h>
-#include "container.h"
-#include "torint.h"
+#include "common/container.h"
+#include "common/torint.h"
/** Length of the output of our message digest. */
#define DIGEST_LEN 20
diff --git a/src/common/crypto_ed25519.c b/src/common/crypto_ed25519.c
index 9859d5f347..b0b954796c 100644
--- a/src/common/crypto_ed25519.c
+++ b/src/common/crypto_ed25519.c
@@ -21,15 +21,15 @@
#include <sys/stat.h>
#endif
-#include "crypto_curve25519.h"
-#include "crypto_digest.h"
-#include "crypto_ed25519.h"
-#include "crypto_format.h"
-#include "crypto_rand.h"
-#include "crypto_util.h"
-#include "torlog.h"
-#include "util.h"
-#include "util_format.h"
+#include "common/crypto_curve25519.h"
+#include "common/crypto_digest.h"
+#include "common/crypto_ed25519.h"
+#include "common/crypto_format.h"
+#include "common/crypto_rand.h"
+#include "common/crypto_util.h"
+#include "common/torlog.h"
+#include "common/util.h"
+#include "common/util_format.h"
#include "ed25519/ref10/ed25519_ref10.h"
#include "ed25519/donna/ed25519_donna_tor.h"
diff --git a/src/common/crypto_ed25519.h b/src/common/crypto_ed25519.h
index 7573044b87..20c04226e3 100644
--- a/src/common/crypto_ed25519.h
+++ b/src/common/crypto_ed25519.h
@@ -4,10 +4,10 @@
#ifndef TOR_CRYPTO_ED25519_H
#define TOR_CRYPTO_ED25519_H
-#include "testsupport.h"
-#include "torint.h"
-#include "crypto_curve25519.h"
-#include "util.h"
+#include "common/testsupport.h"
+#include "common/torint.h"
+#include "common/crypto_curve25519.h"
+#include "common/util.h"
#define ED25519_PUBKEY_LEN 32
#define ED25519_SECKEY_LEN 64
diff --git a/src/common/crypto_format.c b/src/common/crypto_format.c
index eb7f81d177..6245b70ccb 100644
--- a/src/common/crypto_format.c
+++ b/src/common/crypto_format.c
@@ -14,15 +14,15 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#include "container.h"
-#include "crypto_curve25519.h"
-#include "crypto_digest.h"
-#include "crypto_ed25519.h"
-#include "crypto_format.h"
-#include "crypto_util.h"
-#include "util.h"
-#include "util_format.h"
-#include "torlog.h"
+#include "common/container.h"
+#include "common/crypto_curve25519.h"
+#include "common/crypto_digest.h"
+#include "common/crypto_ed25519.h"
+#include "common/crypto_format.h"
+#include "common/crypto_util.h"
+#include "common/util.h"
+#include "common/util_format.h"
+#include "common/torlog.h"
/** Write the <b>datalen</b> bytes from <b>data</b> to the file named
* <b>fname</b> in the tagged-data format. This format contains a
diff --git a/src/common/crypto_format.h b/src/common/crypto_format.h
index 4df89c05bc..325b1ef44d 100644
--- a/src/common/crypto_format.h
+++ b/src/common/crypto_format.h
@@ -7,9 +7,9 @@
#ifndef TOR_CRYPTO_FORMAT_H
#define TOR_CRYPTO_FORMAT_H
-#include "testsupport.h"
-#include "torint.h"
-#include "crypto_ed25519.h"
+#include "common/testsupport.h"
+#include "common/torint.h"
+#include "common/crypto_ed25519.h"
int crypto_write_tagged_contents_to_file(const char *fname,
const char *typestring,
diff --git a/src/common/crypto_hkdf.c b/src/common/crypto_hkdf.c
index acadf8ab2a..46c30bc72b 100644
--- a/src/common/crypto_hkdf.c
+++ b/src/common/crypto_hkdf.c
@@ -9,9 +9,9 @@
* \brief Block of functions related with HKDF utilities and operations.
**/
-#include "crypto_hkdf.h"
-#include "crypto_util.h"
-#include "crypto_digest.h"
+#include "common/crypto_hkdf.h"
+#include "common/crypto_util.h"
+#include "common/crypto_digest.h"
/** Given <b>key_in_len</b> bytes of negotiated randomness in <b>key_in</b>
* ("K"), expand it into <b>key_out_len</b> bytes of negotiated key material in
diff --git a/src/common/crypto_hkdf.h b/src/common/crypto_hkdf.h
index af697b2341..784f4bbbe4 100644
--- a/src/common/crypto_hkdf.h
+++ b/src/common/crypto_hkdf.h
@@ -13,7 +13,7 @@
#ifndef TOR_CRYPTO_HKDF_H
#define TOR_CRYPTO_HKDF_H
-#include "util.h"
+#include "common/util.h"
int crypto_expand_key_material_TAP(const uint8_t *key_in,
size_t key_in_len,
diff --git a/src/common/crypto_openssl_mgt.c b/src/common/crypto_openssl_mgt.c
index e568b7aed6..8acb9cdf1c 100644
--- a/src/common/crypto_openssl_mgt.c
+++ b/src/common/crypto_openssl_mgt.c
@@ -10,8 +10,8 @@
* \brief Block of functions related to operations from OpenSSL.
**/
-#include "compat_openssl.h"
-#include "crypto_openssl_mgt.h"
+#include "common/compat_openssl.h"
+#include "common/crypto_openssl_mgt.h"
DISABLE_GCC_WARNING(redundant-decls)
diff --git a/src/common/crypto_openssl_mgt.h b/src/common/crypto_openssl_mgt.h
index b892dea0e1..e3f5531b7d 100644
--- a/src/common/crypto_openssl_mgt.h
+++ b/src/common/crypto_openssl_mgt.h
@@ -14,7 +14,7 @@
#define TOR_CRYPTO_OPENSSL_H
#include <stdio.h>
-#include "util.h"
+#include "common/util.h"
#include <openssl/engine.h>
diff --git a/src/common/crypto_pwbox.c b/src/common/crypto_pwbox.c
index 14ede1bd61..5ffe138ee2 100644
--- a/src/common/crypto_pwbox.c
+++ b/src/common/crypto_pwbox.c
@@ -8,15 +8,15 @@
* them to disk.
*/
-#include "crypto.h"
-#include "crypto_digest.h"
-#include "crypto_pwbox.h"
-#include "crypto_rand.h"
-#include "crypto_s2k.h"
-#include "crypto_util.h"
-#include "di_ops.h"
-#include "util.h"
-#include "pwbox.h"
+#include "common/crypto.h"
+#include "common/crypto_digest.h"
+#include "common/crypto_pwbox.h"
+#include "common/crypto_rand.h"
+#include "common/crypto_s2k.h"
+#include "common/crypto_util.h"
+#include "common/di_ops.h"
+#include "common/util.h"
+#include "trunnel/pwbox.h"
/* 8 bytes "TORBOX00"
1 byte: header len (H)
diff --git a/src/common/crypto_pwbox.h b/src/common/crypto_pwbox.h
index f368697660..2c73c700eb 100644
--- a/src/common/crypto_pwbox.h
+++ b/src/common/crypto_pwbox.h
@@ -4,7 +4,7 @@
#ifndef CRYPTO_PWBOX_H_INCLUDED_
#define CRYPTO_PWBOX_H_INCLUDED_
-#include "torint.h"
+#include "common/torint.h"
#define UNPWBOX_OKAY 0
#define UNPWBOX_BAD_SECRET -1
diff --git a/src/common/crypto_rand.c b/src/common/crypto_rand.c
index df2e2f65d3..6c88e28d88 100644
--- a/src/common/crypto_rand.c
+++ b/src/common/crypto_rand.c
@@ -14,22 +14,22 @@
#ifndef CRYPTO_RAND_PRIVATE
#define CRYPTO_RAND_PRIVATE
-#include "crypto_rand.h"
+#include "common/crypto_rand.h"
#ifdef _WIN32
#include <windows.h>
#include <wincrypt.h>
#endif /* defined(_WIN32) */
-#include "container.h"
-#include "compat.h"
-#include "compat_openssl.h"
-#include "crypto_util.h"
-#include "sandbox.h"
-#include "testsupport.h"
-#include "torlog.h"
-#include "util.h"
-#include "util_format.h"
+#include "common/container.h"
+#include "common/compat.h"
+#include "common/compat_openssl.h"
+#include "common/crypto_util.h"
+#include "common/sandbox.h"
+#include "common/testsupport.h"
+#include "common/torlog.h"
+#include "common/util.h"
+#include "common/util_format.h"
DISABLE_GCC_WARNING(redundant-decls)
#include <openssl/rand.h>
diff --git a/src/common/crypto_rand.h b/src/common/crypto_rand.h
index bb02e51001..2e05adc93d 100644
--- a/src/common/crypto_rand.h
+++ b/src/common/crypto_rand.h
@@ -13,8 +13,8 @@
#ifndef TOR_CRYPTO_RAND_H
#define TOR_CRYPTO_RAND_H
-#include "torint.h"
-#include "util.h"
+#include "common/torint.h"
+#include "common/util.h"
/* random numbers */
int crypto_seed_rng(void) ATTR_WUR;
diff --git a/src/common/crypto_rsa.c b/src/common/crypto_rsa.c
index f365c3193f..3128983435 100644
--- a/src/common/crypto_rsa.c
+++ b/src/common/crypto_rsa.c
@@ -9,14 +9,14 @@
* \brief Block of functions related with RSA utilities and operations.
**/
-#include "crypto.h"
-#include "crypto_curve25519.h"
-#include "crypto_digest.h"
-#include "crypto_format.h"
-#include "compat_openssl.h"
-#include "crypto_rand.h"
-#include "crypto_rsa.h"
-#include "crypto_util.h"
+#include "common/crypto.h"
+#include "common/crypto_curve25519.h"
+#include "common/crypto_digest.h"
+#include "common/crypto_format.h"
+#include "common/compat_openssl.h"
+#include "common/crypto_rand.h"
+#include "common/crypto_rsa.h"
+#include "common/crypto_util.h"
DISABLE_GCC_WARNING(redundant-decls)
@@ -33,9 +33,9 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
-#include "torlog.h"
-#include "util.h"
-#include "util_format.h"
+#include "common/torlog.h"
+#include "common/util.h"
+#include "common/util_format.h"
/** Declaration for crypto_pk_t structure. */
struct crypto_pk_t
diff --git a/src/common/crypto_rsa.h b/src/common/crypto_rsa.h
index 3c09d5c626..c56eab319a 100644
--- a/src/common/crypto_rsa.h
+++ b/src/common/crypto_rsa.h
@@ -15,13 +15,13 @@
#include "orconfig.h"
-#include "crypto_digest.h"
+#include "common/crypto_digest.h"
#include <stdio.h>
-#include "torint.h"
-#include "testsupport.h"
-#include "compat.h"
-#include "util.h"
-#include "torlog.h"
+#include "common/torint.h"
+#include "common/testsupport.h"
+#include "common/compat.h"
+#include "common/util.h"
+#include "common/torlog.h"
/** Length of our public keys. */
#define PK_BYTES (1024/8)
diff --git a/src/common/crypto_s2k.c b/src/common/crypto_s2k.c
index 14bd5c28bb..db57691f60 100644
--- a/src/common/crypto_s2k.c
+++ b/src/common/crypto_s2k.c
@@ -12,14 +12,14 @@
#define CRYPTO_S2K_PRIVATE
-#include "compat.h"
-#include "crypto.h"
-#include "crypto_digest.h"
-#include "crypto_hkdf.h"
-#include "crypto_rand.h"
-#include "crypto_s2k.h"
-#include "crypto_util.h"
-#include "util.h"
+#include "common/compat.h"
+#include "common/crypto.h"
+#include "common/crypto_digest.h"
+#include "common/crypto_hkdf.h"
+#include "common/crypto_rand.h"
+#include "common/crypto_s2k.h"
+#include "common/crypto_util.h"
+#include "common/util.h"
#include <openssl/evp.h>
diff --git a/src/common/crypto_s2k.h b/src/common/crypto_s2k.h
index 1609a20d2c..bc7224e8ea 100644
--- a/src/common/crypto_s2k.h
+++ b/src/common/crypto_s2k.h
@@ -8,7 +8,7 @@
#define TOR_CRYPTO_S2K_H_INCLUDED
#include <stdio.h>
-#include "torint.h"
+#include "common/torint.h"
/** Length of RFC2440-style S2K specifier: the first 8 bytes are a salt, the
* 9th describes how much iteration to do. */
diff --git a/src/common/crypto_util.c b/src/common/crypto_util.c
index 2933579cf9..71707d4bfb 100644
--- a/src/common/crypto_util.c
+++ b/src/common/crypto_util.c
@@ -13,7 +13,7 @@
#ifndef CRYPTO_UTIL_PRIVATE
#define CRYPTO_UTIL_PRIVATE
-#include "crypto_util.h"
+#include "common/crypto_util.h"
#include <string.h>
@@ -23,7 +23,7 @@
#include <wincrypt.h>
#endif /* defined(_WIN32) */
-#include "util.h"
+#include "common/util.h"
DISABLE_GCC_WARNING(redundant-decls)
@@ -32,7 +32,7 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
-#include "torlog.h"
+#include "common/torlog.h"
/**
* Destroy the <b>sz</b> bytes of data stored at <b>mem</b>, setting them to
diff --git a/src/common/crypto_util.h b/src/common/crypto_util.h
index 31af52bffc..53d9027fbc 100644
--- a/src/common/crypto_util.h
+++ b/src/common/crypto_util.h
@@ -13,7 +13,7 @@
#ifndef TOR_CRYPTO_UTIL_H
#define TOR_CRYPTO_UTIL_H
-#include "torint.h"
+#include "common/torint.h"
/** OpenSSL-based utility functions. */
void memwipe(void *mem, uint8_t byte, size_t sz);
diff --git a/src/common/di_ops.c b/src/common/di_ops.c
index c09f97ef6f..1ff1988b10 100644
--- a/src/common/di_ops.c
+++ b/src/common/di_ops.c
@@ -7,9 +7,9 @@
**/
#include "orconfig.h"
-#include "di_ops.h"
-#include "torlog.h"
-#include "util.h"
+#include "common/di_ops.h"
+#include "common/torlog.h"
+#include "common/util.h"
/**
* Timing-safe version of memcmp. As memcmp, compare the <b>sz</b> bytes at
diff --git a/src/common/di_ops.h b/src/common/di_ops.h
index d54a0cc444..8298bfa73a 100644
--- a/src/common/di_ops.h
+++ b/src/common/di_ops.h
@@ -12,7 +12,7 @@
#define TOR_DI_OPS_H
#include "orconfig.h"
-#include "torint.h"
+#include "common/torint.h"
int tor_memcmp(const void *a, const void *b, size_t sz);
int tor_memeq(const void *a, const void *b, size_t sz);
diff --git a/src/common/handles.h b/src/common/handles.h
index 591464366d..ca345b0bcb 100644
--- a/src/common/handles.h
+++ b/src/common/handles.h
@@ -51,7 +51,7 @@
#include "orconfig.h"
#include "tor_queue.h"
-#include "util.h"
+#include "common/util.h"
#define HANDLE_ENTRY(name, structname) \
struct name ## _handle_head_t *handle_head
diff --git a/src/common/log.c b/src/common/log.c
index d7c0a898bb..7ba669818f 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -30,11 +30,11 @@
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#include "compat.h"
-#include "util.h"
+#include "common/compat.h"
+#include "common/util.h"
#define LOG_PRIVATE
-#include "torlog.h"
-#include "container.h"
+#include "common/torlog.h"
+#include "common/container.h"
#ifdef HAVE_ANDROID_LOG_H
#include <android/log.h>
#endif // HAVE_ANDROID_LOG_H.
diff --git a/src/common/memarea.c b/src/common/memarea.c
index e0fe471619..12ad9c511c 100644
--- a/src/common/memarea.c
+++ b/src/common/memarea.c
@@ -9,11 +9,11 @@
#include "orconfig.h"
#include <stddef.h>
#include <stdlib.h>
-#include "memarea.h"
-#include "util.h"
-#include "compat.h"
-#include "torlog.h"
-#include "container.h"
+#include "common/memarea.h"
+#include "common/util.h"
+#include "common/compat.h"
+#include "common/torlog.h"
+#include "common/container.h"
#ifndef DISABLE_MEMORY_SENTINELS
diff --git a/src/common/procmon.c b/src/common/procmon.c
index ac286abd11..7703b88afd 100644
--- a/src/common/procmon.c
+++ b/src/common/procmon.c
@@ -6,9 +6,9 @@
* \brief Process-termination monitor functions
**/
-#include "procmon.h"
+#include "common/procmon.h"
-#include "util.h"
+#include "common/util.h"
#ifdef HAVE_SIGNAL_H
#include <signal.h>
diff --git a/src/common/procmon.h b/src/common/procmon.h
index 80a2bf9636..46b6435af6 100644
--- a/src/common/procmon.h
+++ b/src/common/procmon.h
@@ -9,10 +9,10 @@
#ifndef TOR_PROCMON_H
#define TOR_PROCMON_H
-#include "compat.h"
-#include "compat_libevent.h"
+#include "common/compat.h"
+#include "common/compat_libevent.h"
-#include "torlog.h"
+#include "common/torlog.h"
typedef struct tor_process_monitor_t tor_process_monitor_t;
diff --git a/src/common/pubsub.c b/src/common/pubsub.c
index 744ee83458..93e8b5e6ef 100644
--- a/src/common/pubsub.c
+++ b/src/common/pubsub.c
@@ -8,8 +8,8 @@
*/
#include "orconfig.h"
-#include "pubsub.h"
-#include "container.h"
+#include "common/pubsub.h"
+#include "common/container.h"
/** Helper: insert <b>s</b> into <b>topic's</b> list of subscribers, keeping
* them sorted in priority order. */
diff --git a/src/common/pubsub.h b/src/common/pubsub.h
index 759b2e1747..628732b67f 100644
--- a/src/common/pubsub.h
+++ b/src/common/pubsub.h
@@ -42,7 +42,7 @@
#ifndef TOR_PUBSUB_H
#define TOR_PUBSUB_H
-#include "torint.h"
+#include "common/torint.h"
/**
* Flag for T_subscribe: die with an assertion failure if the event
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index 964dc07656..cba63e04f8 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -32,11 +32,11 @@
#include <string.h>
#include <stdlib.h>
-#include "sandbox.h"
-#include "container.h"
-#include "torlog.h"
-#include "torint.h"
-#include "util.h"
+#include "common/sandbox.h"
+#include "common/container.h"
+#include "common/torlog.h"
+#include "common/torint.h"
+#include "common/util.h"
#include "tor_queue.h"
#include "ht.h"
@@ -79,7 +79,7 @@
defined(HAVE_BACKTRACE_SYMBOLS_FD) && defined(HAVE_SIGACTION)
#define USE_BACKTRACE
#define EXPOSE_CLEAN_BACKTRACE
-#include "backtrace.h"
+#include "common/backtrace.h"
#endif /* defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) && ... */
#ifdef USE_BACKTRACE
diff --git a/src/common/sandbox.h b/src/common/sandbox.h
index a25886ccb1..945d57df7e 100644
--- a/src/common/sandbox.h
+++ b/src/common/sandbox.h
@@ -13,7 +13,7 @@
#define SANDBOX_H_
#include "orconfig.h"
-#include "torint.h"
+#include "common/torint.h"
#ifndef SYS_SECCOMP
diff --git a/src/common/storagedir.c b/src/common/storagedir.c
index 4c3d7238e0..ee80bcc530 100644
--- a/src/common/storagedir.c
+++ b/src/common/storagedir.c
@@ -1,14 +1,14 @@
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "container.h"
-#include "compat.h"
-#include "confline.h"
-#include "memarea.h"
-#include "sandbox.h"
-#include "storagedir.h"
-#include "torlog.h"
-#include "util.h"
+#include "common/container.h"
+#include "common/compat.h"
+#include "common/confline.h"
+#include "common/memarea.h"
+#include "common/sandbox.h"
+#include "common/storagedir.h"
+#include "common/torlog.h"
+#include "common/util.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
diff --git a/src/common/timers.c b/src/common/timers.c
index cadbe7ff6c..2c39cf74b2 100644
--- a/src/common/timers.c
+++ b/src/common/timers.c
@@ -31,11 +31,11 @@
#define TOR_TIMERS_PRIVATE
-#include "compat.h"
-#include "compat_libevent.h"
-#include "timers.h"
-#include "torlog.h"
-#include "util.h"
+#include "common/compat.h"
+#include "common/compat_libevent.h"
+#include "common/timers.h"
+#include "common/torlog.h"
+#include "common/util.h"
struct timeout_cb {
timer_cb_fn_t cb;
diff --git a/src/common/timers.h b/src/common/timers.h
index c8abaae106..6b6179ca7c 100644
--- a/src/common/timers.h
+++ b/src/common/timers.h
@@ -5,7 +5,7 @@
#define TOR_TIMERS_H
#include "orconfig.h"
-#include "testsupport.h"
+#include "common/testsupport.h"
struct monotime_t;
typedef struct timeout tor_timer_t;
diff --git a/src/common/token_bucket.c b/src/common/token_bucket.c
index 62b5b7829d..a028b08a0b 100644
--- a/src/common/token_bucket.c
+++ b/src/common/token_bucket.c
@@ -18,8 +18,8 @@
#define TOKEN_BUCKET_PRIVATE
-#include "token_bucket.h"
-#include "util_bug.h"
+#include "common/token_bucket.h"
+#include "common/util_bug.h"
/**
* Set the <b>rate</b> and <b>burst</b> value in a token_bucket_cfg.
diff --git a/src/common/token_bucket.h b/src/common/token_bucket.h
index 6a8efeaaae..645c90c624 100644
--- a/src/common/token_bucket.h
+++ b/src/common/token_bucket.h
@@ -9,8 +9,8 @@
#ifndef TOR_TOKEN_BUCKET_H
#define TOR_TOKEN_BUCKET_H
-#include "torint.h"
-#include "testsupport.h"
+#include "common/torint.h"
+#include "common/testsupport.h"
/** Largest allowable burst value for a token buffer. */
#define TOKEN_BUCKET_MAX_BURST INT32_MAX
diff --git a/src/common/torlog.h b/src/common/torlog.h
index 9b4df60806..65921c7b0a 100644
--- a/src/common/torlog.h
+++ b/src/common/torlog.h
@@ -12,8 +12,8 @@
#ifndef TOR_TORLOG_H
-#include "compat.h"
-#include "testsupport.h"
+#include "common/compat.h"
+#include "common/testsupport.h"
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 9e509a4b4c..b22a5aa7c9 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -25,11 +25,11 @@
#include <ws2tcpip.h>
#endif
-#include "crypto.h"
-#include "crypto_rand.h"
-#include "crypto_dh.h"
-#include "crypto_util.h"
-#include "compat.h"
+#include "common/crypto.h"
+#include "common/crypto_rand.h"
+#include "common/crypto_dh.h"
+#include "common/crypto_util.h"
+#include "common/compat.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. */
@@ -53,10 +53,10 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
#define TORTLS_PRIVATE
-#include "tortls.h"
-#include "util.h"
-#include "torlog.h"
-#include "container.h"
+#include "common/tortls.h"
+#include "common/util.h"
+#include "common/torlog.h"
+#include "common/container.h"
#include <string.h>
#ifdef OPENSSL_1_1_API
diff --git a/src/common/tortls.h b/src/common/tortls.h
index c86b98885a..c7b319761d 100644
--- a/src/common/tortls.h
+++ b/src/common/tortls.h
@@ -11,10 +11,10 @@
* \brief Headers for tortls.c
**/
-#include "crypto_rsa.h"
-#include "compat_openssl.h"
-#include "compat.h"
-#include "testsupport.h"
+#include "common/crypto_rsa.h"
+#include "common/compat_openssl.h"
+#include "common/compat.h"
+#include "common/testsupport.h"
/* Opaque structure to hold a TLS connection. */
typedef struct tor_tls_t tor_tls_t;
diff --git a/src/common/util.c b/src/common/util.c
index a0b672f0df..b3fdc8a43a 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -14,16 +14,16 @@
#include <fcntl.h>
#endif
#define UTIL_PRIVATE
-#include "util.h"
-#include "torlog.h"
-#include "crypto_digest.h"
-#include "torint.h"
-#include "container.h"
-#include "address.h"
-#include "sandbox.h"
-#include "backtrace.h"
-#include "util_process.h"
-#include "util_format.h"
+#include "common/util.h"
+#include "common/torlog.h"
+#include "common/crypto_digest.h"
+#include "common/torint.h"
+#include "common/container.h"
+#include "common/address.h"
+#include "common/sandbox.h"
+#include "common/backtrace.h"
+#include "common/util_process.h"
+#include "common/util_format.h"
#ifdef _WIN32
#include <io.h>
diff --git a/src/common/util.h b/src/common/util.h
index 504ba322fe..dcfa55f8fe 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -12,17 +12,17 @@
#define TOR_UTIL_H
#include "orconfig.h"
-#include "torint.h"
-#include "compat.h"
-#include "di_ops.h"
-#include "testsupport.h"
+#include "common/torint.h"
+#include "common/compat.h"
+#include "common/di_ops.h"
+#include "common/testsupport.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32
/* for the correct alias to struct stat */
#include <sys/stat.h>
#endif
-#include "util_bug.h"
+#include "common/util_bug.h"
#ifndef O_BINARY
#define O_BINARY 0
diff --git a/src/common/util_bug.c b/src/common/util_bug.c
index 0fa085acbe..da34201c1e 100644
--- a/src/common/util_bug.c
+++ b/src/common/util_bug.c
@@ -8,10 +8,10 @@
**/
#include "orconfig.h"
-#include "util_bug.h"
-#include "torlog.h"
-#include "backtrace.h"
-#include "container.h"
+#include "common/util_bug.h"
+#include "common/torlog.h"
+#include "common/backtrace.h"
+#include "common/container.h"
#ifdef __COVERITY__
int bug_macro_deadcode_dummy__ = 0;
diff --git a/src/common/util_bug.h b/src/common/util_bug.h
index 1bd2e81c30..70a28eb156 100644
--- a/src/common/util_bug.h
+++ b/src/common/util_bug.h
@@ -37,8 +37,8 @@
#define TOR_UTIL_BUG_H
#include "orconfig.h"
-#include "compat.h"
-#include "testsupport.h"
+#include "common/compat.h"
+#include "common/testsupport.h"
/* Replace assert() with a variant that sends failures to the log before
* calling assert() normally.
diff --git a/src/common/util_format.c b/src/common/util_format.c
index b226c538f2..cab2572343 100644
--- a/src/common/util_format.c
+++ b/src/common/util_format.c
@@ -12,10 +12,10 @@
*/
#include "orconfig.h"
-#include "torlog.h"
-#include "util.h"
-#include "util_format.h"
-#include "torint.h"
+#include "common/torlog.h"
+#include "common/util.h"
+#include "common/util_format.h"
+#include "common/torint.h"
#include <stddef.h>
#include <string.h>
diff --git a/src/common/util_format.h b/src/common/util_format.h
index ce55b95af1..7dd5ae5bd8 100644
--- a/src/common/util_format.h
+++ b/src/common/util_format.h
@@ -7,8 +7,8 @@
#ifndef TOR_UTIL_FORMAT_H
#define TOR_UTIL_FORMAT_H
-#include "testsupport.h"
-#include "torint.h"
+#include "common/testsupport.h"
+#include "common/torint.h"
/** @{ */
/** These macros don't check for overflow. Use them only for constant inputs
diff --git a/src/common/util_process.c b/src/common/util_process.c
index de218700ba..6eee659b27 100644
--- a/src/common/util_process.c
+++ b/src/common/util_process.c
@@ -19,10 +19,10 @@
#include <sys/wait.h>
#endif
-#include "compat.h"
-#include "util.h"
-#include "torlog.h"
-#include "util_process.h"
+#include "common/compat.h"
+#include "common/util.h"
+#include "common/torlog.h"
+#include "common/util_process.h"
#include "ht.h"
/* ================================================== */
diff --git a/src/common/workqueue.c b/src/common/workqueue.c
index 563a98af96..0d31a2ecca 100644
--- a/src/common/workqueue.c
+++ b/src/common/workqueue.c
@@ -24,14 +24,14 @@
*/
#include "orconfig.h"
-#include "compat.h"
-#include "compat_libevent.h"
-#include "compat_threads.h"
-#include "crypto_rand.h"
-#include "util.h"
-#include "workqueue.h"
+#include "common/compat.h"
+#include "common/compat_libevent.h"
+#include "common/compat_threads.h"
+#include "common/crypto_rand.h"
+#include "common/util.h"
+#include "common/workqueue.h"
#include "tor_queue.h"
-#include "torlog.h"
+#include "common/torlog.h"
#include <event2/event.h>
diff --git a/src/common/workqueue.h b/src/common/workqueue.h
index 4e76fd86ea..1e0efcb1a2 100644
--- a/src/common/workqueue.h
+++ b/src/common/workqueue.h
@@ -4,7 +4,7 @@
#ifndef TOR_WORKQUEUE_H
#define TOR_WORKQUEUE_H
-#include "compat.h"
+#include "common/compat.h"
/** A replyqueue is used to tell the main thread about the outcome of
* work that we queued for the workers. */