Browse Source

Run rectify_include_paths.py

Nick Mathewson 5 years ago
parent
commit
0dab29ce10
100 changed files with 368 additions and 368 deletions
  1. 2 1
      Makefile.am
  2. 1 1
      scripts/maint/rectify_include_paths.py
  3. 7 7
      src/common/address.c
  4. 3 3
      src/common/address.h
  5. 6 6
      src/common/address_set.c
  6. 1 1
      src/common/address_set.h
  7. 7 7
      src/common/aes.c
  8. 4 4
      src/common/backtrace.c
  9. 6 6
      src/common/buffers.c
  10. 3 3
      src/common/buffers.h
  11. 8 8
      src/common/buffers_tls.c
  12. 6 6
      src/common/compat.c
  13. 4 4
      src/common/compat.h
  14. 5 5
      src/common/compat_libevent.c
  15. 1 1
      src/common/compat_libevent.h
  16. 1 1
      src/common/compat_openssl.h
  17. 3 3
      src/common/compat_pthreads.c
  18. 4 4
      src/common/compat_threads.c
  19. 2 2
      src/common/compat_threads.h
  20. 4 4
      src/common/compat_time.c
  21. 4 4
      src/common/compat_winthreads.c
  22. 8 8
      src/common/compress.c
  23. 4 4
      src/common/compress_lzma.c
  24. 4 4
      src/common/compress_none.c
  25. 4 4
      src/common/compress_zlib.c
  26. 4 4
      src/common/compress_zstd.c
  27. 5 5
      src/common/confline.c
  28. 1 1
      src/common/confline.h
  29. 5 5
      src/common/container.c
  30. 1 1
      src/common/container.h
  31. 18 18
      src/common/crypto.c
  32. 4 4
      src/common/crypto.h
  33. 8 8
      src/common/crypto_curve25519.c
  34. 4 4
      src/common/crypto_curve25519.h
  35. 6 6
      src/common/crypto_dh.c
  36. 1 1
      src/common/crypto_dh.h
  37. 5 5
      src/common/crypto_digest.c
  38. 2 2
      src/common/crypto_digest.h
  39. 9 9
      src/common/crypto_ed25519.c
  40. 4 4
      src/common/crypto_ed25519.h
  41. 9 9
      src/common/crypto_format.c
  42. 3 3
      src/common/crypto_format.h
  43. 3 3
      src/common/crypto_hkdf.c
  44. 1 1
      src/common/crypto_hkdf.h
  45. 2 2
      src/common/crypto_openssl_mgt.c
  46. 1 1
      src/common/crypto_openssl_mgt.h
  47. 9 9
      src/common/crypto_pwbox.c
  48. 1 1
      src/common/crypto_pwbox.h
  49. 10 10
      src/common/crypto_rand.c
  50. 2 2
      src/common/crypto_rand.h
  51. 11 11
      src/common/crypto_rsa.c
  52. 6 6
      src/common/crypto_rsa.h
  53. 8 8
      src/common/crypto_s2k.c
  54. 1 1
      src/common/crypto_s2k.h
  55. 3 3
      src/common/crypto_util.c
  56. 1 1
      src/common/crypto_util.h
  57. 3 3
      src/common/di_ops.c
  58. 1 1
      src/common/di_ops.h
  59. 1 1
      src/common/handles.h
  60. 4 4
      src/common/log.c
  61. 5 5
      src/common/memarea.c
  62. 2 2
      src/common/procmon.c
  63. 3 3
      src/common/procmon.h
  64. 2 2
      src/common/pubsub.c
  65. 1 1
      src/common/pubsub.h
  66. 6 6
      src/common/sandbox.c
  67. 1 1
      src/common/sandbox.h
  68. 8 8
      src/common/storagedir.c
  69. 5 5
      src/common/timers.c
  70. 1 1
      src/common/timers.h
  71. 2 2
      src/common/token_bucket.c
  72. 2 2
      src/common/token_bucket.h
  73. 2 2
      src/common/torlog.h
  74. 9 9
      src/common/tortls.c
  75. 4 4
      src/common/tortls.h
  76. 10 10
      src/common/util.c
  77. 5 5
      src/common/util.h
  78. 4 4
      src/common/util_bug.c
  79. 2 2
      src/common/util_bug.h
  80. 4 4
      src/common/util_format.c
  81. 2 2
      src/common/util_format.h
  82. 4 4
      src/common/util_process.c
  83. 7 7
      src/common/workqueue.c
  84. 1 1
      src/common/workqueue.h
  85. 1 1
      src/ext/OpenBSD_malloc_Linux.c
  86. 2 2
      src/ext/csiphash.c
  87. 1 1
      src/ext/curve25519_donna/curve25519-donna-c64.c
  88. 1 1
      src/ext/curve25519_donna/curve25519-donna.c
  89. 1 1
      src/ext/ed25519/donna/ed25519-hash-custom.h
  90. 1 1
      src/ext/ed25519/donna/ed25519-randombytes-custom.h
  91. 1 1
      src/ext/ed25519/donna/ed25519_donna_tor.h
  92. 1 1
      src/ext/ed25519/donna/ed25519_tor.c
  93. 1 1
      src/ext/ed25519/ref10/blinding.c
  94. 1 1
      src/ext/ed25519/ref10/crypto_hash_sha512.h
  95. 1 1
      src/ext/ed25519/ref10/crypto_int32.h
  96. 1 1
      src/ext/ed25519/ref10/crypto_int64.h
  97. 1 1
      src/ext/ed25519/ref10/crypto_uint32.h
  98. 1 1
      src/ext/ed25519/ref10/crypto_uint64.h
  99. 1 2
      src/ext/ed25519/ref10/crypto_verify_32.h
  100. 1 1
      src/ext/ed25519/ref10/ed25519_ref10.h

+ 2 - 1
Makefile.am

@@ -18,7 +18,8 @@ bin_SCRIPTS=
 AM_CPPFLAGS=\
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/ext \
-	-I$(top_srcdir)/src/ext/trunnel
+	-I$(top_srcdir)/src/ext/trunnel \
+	-I$(top_srcdir)/src/trunnel
 
 AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@ @TOR_LZMA_CFLAGS@ @TOR_ZSTD_CFLAGS@
 SHELL=@SHELL@

+ 1 - 1
scripts/maint/rectify_include_paths.py

@@ -46,7 +46,7 @@ def fix_includes(inp, out, mapping):
 incs = get_include_map()
 
 for dirpath,dirnames,fnames in os.walk("src"):
-    exclude(["ext", "trunnel"], dirnames)
+    exclude(["trunnel"], dirnames)
 
     for fname in fnames:
         if fname.endswith(".c") or fname.endswith(".h"):

+ 7 - 7
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>

+ 3 - 3
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
 

+ 6 - 6
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 */

+ 1 - 1
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

+ 7 - 7
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. */

+ 4 - 4
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)

+ 6 - 6
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

+ 3 - 3
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;
 

+ 8 - 8
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

+ 6 - 6
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

+ 4 - 4
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) */
 

+ 5 - 5
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>

+ 1 - 1
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);

+ 1 - 1
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

+ 3 - 3
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.

+ 4 - 4
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>

+ 2 - 2
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>

+ 4 - 4
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

+ 4 - 4
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

+ 8 - 8
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;

+ 4 - 4
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>

+ 4 - 4
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

+ 4 - 4
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

+ 4 - 4
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

+ 5 - 5
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,

+ 1 - 1
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

+ 5 - 5
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>

+ 1 - 1
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.

+ 18 - 18
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"
 

+ 4 - 4
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

+ 8 - 8
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"
 

+ 4 - 4
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

+ 6 - 6
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.*/

+ 1 - 1
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)

+ 5 - 5
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"
 

+ 2 - 2
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

+ 9 - 9
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"

+ 4 - 4
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

+ 9 - 9
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

+ 3 - 3
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,

+ 3 - 3
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

+ 1 - 1
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,

+ 2 - 2
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)
 

+ 1 - 1
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>
 

+ 9 - 9
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)

+ 1 - 1
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

+ 10 - 10
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>

+ 2 - 2
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;

+ 11 - 11
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

+ 6 - 6
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)

+ 8 - 8
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>
 

+ 1 - 1
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. */

+ 3 - 3
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

+ 1 - 1
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);

+ 3 - 3
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

+ 1 - 1
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);

+ 1 - 1
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

+ 4 - 4
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.

+ 5 - 5
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
 

+ 2 - 2
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>

+ 3 - 3
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;
 

+ 2 - 2
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. */

+ 1 - 1
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

+ 6 - 6
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

+ 1 - 1
src/common/sandbox.h

@@ -13,7 +13,7 @@
 #define SANDBOX_H_
 
 #include "orconfig.h"
-#include "torint.h"
+#include "common/torint.h"
 
 #ifndef SYS_SECCOMP
 

+ 8 - 8
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>

+ 5 - 5
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;

+ 1 - 1
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;

+ 2 - 2
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.

+ 2 - 2
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

+ 2 - 2
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>

+ 9 - 9
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

+ 4 - 4
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;

+ 10 - 10
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>

+ 5 - 5
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

+ 4 - 4
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;

+ 2 - 2
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.

+ 4 - 4
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>

+ 2 - 2
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

+ 4 - 4
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"
 
 /* ================================================== */

+ 7 - 7
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>
 

+ 1 - 1
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. */

+ 1 - 1
src/ext/OpenBSD_malloc_Linux.c

@@ -59,7 +59,7 @@
 #include <errno.h>
 #include <err.h>
 /* For SIZE_MAX */
-#include "torint.h"
+#include "common/torint.h"
 
 //#include "thread_private.h"
 

+ 2 - 2
src/ext/csiphash.c

@@ -29,10 +29,10 @@
     Jean-Philippe Aumasson (https://131002.net/siphash/siphash24.c)
 */
 
-#include "torint.h"
+#include "common/torint.h"
 #include "siphash.h"
 /* for tor_assert */
-#include "util.h"
+#include "common/util.h"
 /* for memcpy */
 #include <string.h>
 #include "byteorder.h"

+ 1 - 1
src/ext/curve25519_donna/curve25519-donna-c64.c

@@ -25,7 +25,7 @@
 #include "orconfig.h"
 
 #include <string.h>
-#include "torint.h"
+#include "common/torint.h"
 
 typedef uint8_t u8;
 typedef uint64_t limb;

+ 1 - 1
src/ext/curve25519_donna/curve25519-donna.c

@@ -48,7 +48,7 @@
 #include "orconfig.h"
 
 #include <string.h>
-#include "torint.h"
+#include "common/torint.h"
 
 typedef uint8_t u8;
 typedef int32_t s32;

+ 1 - 1
src/ext/ed25519/donna/ed25519-hash-custom.h

@@ -9,7 +9,7 @@
 	void ed25519_hash(uint8_t *hash, const uint8_t *in, size_t inlen);
 */
 
-#include "crypto_digest.h"
+#include "common/crypto_digest.h"
 
 typedef struct ed25519_hash_context {
   crypto_digest_t *ctx;

+ 1 - 1
src/ext/ed25519/donna/ed25519-randombytes-custom.h

@@ -8,7 +8,7 @@
 */
 
 /* Tor: Instead of calling OpenSSL's CSPRNG directly, call the wrapper. */
-#include "crypto_rand.h"
+#include "common/crypto_rand.h"
 
 static void
 ED25519_FN(ed25519_randombytes_unsafe) (void *p, size_t len)

+ 1 - 1
src/ext/ed25519/donna/ed25519_donna_tor.h

@@ -1,7 +1,7 @@
 /* Added for Tor. */
 #ifndef SRC_EXT_ED25519_DONNA_H_INCLUDED_
 #define SRC_EXT_ED25519_DONNA_H_INCLUDED_
-#include <torint.h>
+#include "common/torint.h"
 
 typedef unsigned char curved25519_key[32];
 

+ 1 - 1
src/ext/ed25519/donna/ed25519_tor.c

@@ -40,7 +40,7 @@
 #include "ed25519-randombytes.h"
 #include "ed25519-hash.h"
 
-#include "crypto_util.h"
+#include "common/crypto_util.h"
 
 typedef unsigned char ed25519_signature[64];
 typedef unsigned char ed25519_public_key[32];

+ 1 - 1
src/ext/ed25519/ref10/blinding.c

@@ -7,7 +7,7 @@
 #include "ed25519_ref10.h"
 
 #include <string.h>
-#include "crypto_util.h"
+#include "common/crypto_util.h"
 
 static void
 ed25519_ref10_gettweak(unsigned char *out, const unsigned char *param)

+ 1 - 1
src/ext/ed25519/ref10/crypto_hash_sha512.h

@@ -1,5 +1,5 @@
 /* Added for Tor. */
-#include "crypto_digest.h"
+#include "common/crypto_digest.h"
 
 /* Set 'out' to the 512-bit SHA512 hash of the 'len'-byte string in 'inp' */
 #define crypto_hash_sha512(out, inp, len) \

+ 1 - 1
src/ext/ed25519/ref10/crypto_int32.h

@@ -3,7 +3,7 @@
 #ifndef CRYPTO_INT32_H
 #define CRYPTO_INT32_H
 
-#include "torint.h"
+#include "common/torint.h"
 #define crypto_int32 int32_t
 #define crypto_uint32 uint32_t
 

+ 1 - 1
src/ext/ed25519/ref10/crypto_int64.h

@@ -3,7 +3,7 @@
 #ifndef CRYPTO_INT64_H
 #define CRYPTO_INT64_H
 
-#include "torint.h"
+#include "common/torint.h"
 #define crypto_int64 int64_t
 #define crypto_uint64 uint64_t
 

+ 1 - 1
src/ext/ed25519/ref10/crypto_uint32.h

@@ -1,3 +1,3 @@
 /* Added for Tor. */
-#include "torint.h"
+#include "common/torint.h"
 #define crypto_uint32 uint32_t

+ 1 - 1
src/ext/ed25519/ref10/crypto_uint64.h

@@ -1,3 +1,3 @@
 /* Added for Tor. */
-#include "torint.h"
+#include "common/torint.h"
 #define crypto_uint64 uint64_t

+ 1 - 2
src/ext/ed25519/ref10/crypto_verify_32.h

@@ -1,5 +1,4 @@
 /* Added for Tor. */
-#include "di_ops.h"
+#include "common/di_ops.h"
 #define crypto_verify_32(a,b) \
   (! tor_memeq((a), (b), 32))
-

+ 1 - 1
src/ext/ed25519/ref10/ed25519_ref10.h

@@ -1,7 +1,7 @@
 /* Added for Tor */
 #ifndef SRC_EXT_ED25519_REF10_H_INCLUDED_
 #define SRC_EXT_ED25519_REF10_H_INCLUDED_
-#include <torint.h>
+#include "common/torint.h"
 
 int ed25519_ref10_seckey(unsigned char *sk);
 int ed25519_ref10_seckey_expand(unsigned char *sk, const unsigned char *sk_seed);

Some files were not shown because too many files changed in this diff