diff options
-rw-r--r-- | src/lib/compress/.may_include | 10 | ||||
-rw-r--r-- | src/lib/compress/compress.c | 8 | ||||
-rw-r--r-- | src/lib/compress/compress.h | 4 | ||||
-rw-r--r-- | src/lib/compress/compress_lzma.c | 7 | ||||
-rw-r--r-- | src/lib/compress/compress_none.c | 5 | ||||
-rw-r--r-- | src/lib/compress/compress_zlib.c | 4 | ||||
-rw-r--r-- | src/lib/compress/compress_zstd.c | 5 |
7 files changed, 28 insertions, 15 deletions
diff --git a/src/lib/compress/.may_include b/src/lib/compress/.may_include index 3f69dd1333..0361774699 100644 --- a/src/lib/compress/.may_include +++ b/src/lib/compress/.may_include @@ -1,7 +1,11 @@ orconfig.h +lib/arch/*.h lib/cc/*.h lib/compress/*.h +lib/ctime/*.h +lib/intmath/*.h lib/log/*.h - -# XXX I'd like to remove this. -common/*.h +lib/malloc/*.h +lib/string/*.h +lib/testsupport/*.h +lib/thread/*.h diff --git a/src/lib/compress/compress.c b/src/lib/compress/compress.c index 64f10b45ce..23a5c03044 100644 --- a/src/lib/compress/compress.c +++ b/src/lib/compress/compress.c @@ -19,13 +19,18 @@ #include <netinet/in.h> #endif -#include "common/util.h" #include "lib/log/torlog.h" +#include "lib/log/util_bug.h" +#include "lib/arch/bytes.h" +#include "lib/ctime/di_ops.h" #include "lib/compress/compress.h" #include "lib/compress/compress_lzma.h" #include "lib/compress/compress_none.h" #include "lib/compress/compress_zlib.h" #include "lib/compress/compress_zstd.h" +#include "lib/intmath/cmp.h" +#include "lib/malloc/util_malloc.h" +#include "lib/thread/threads.h" /** Total number of bytes allocated for compression state overhead. */ static atomic_counter_t total_compress_allocation; @@ -671,4 +676,3 @@ tor_compress_log_init_warnings(void) { tor_zstd_warn_if_version_mismatched(); } - diff --git a/src/lib/compress/compress.h b/src/lib/compress/compress.h index 10ad6d86bc..f88cf2cb2d 100644 --- a/src/lib/compress/compress.h +++ b/src/lib/compress/compress.h @@ -11,6 +11,9 @@ #ifndef TOR_COMPRESS_H #define TOR_COMPRESS_H +#include <stddef.h> +#include "lib/testsupport/testsupport.h" + /** Enumeration of what kind of compression to use. Only ZLIB_METHOD and * GZIP_METHOD is guaranteed to be supported by the compress/uncompress * functions here. Call tor_compress_supports_method() to check if a given @@ -90,4 +93,3 @@ void tor_compress_init(void); void tor_compress_log_init_warnings(void); #endif /* !defined(TOR_COMPRESS_H) */ - diff --git a/src/lib/compress/compress_lzma.c b/src/lib/compress/compress_lzma.c index e7f3680b28..3b6f91b84b 100644 --- a/src/lib/compress/compress_lzma.c +++ b/src/lib/compress/compress_lzma.c @@ -13,10 +13,12 @@ #include "orconfig.h" -#include "common/util.h" -#include "lib/log/torlog.h" #include "lib/compress/compress.h" #include "lib/compress/compress_lzma.h" +#include "lib/log/torlog.h" +#include "lib/log/util_bug.h" +#include "lib/malloc/util_malloc.h" +#include "lib/thread/threads.h" #ifdef HAVE_LZMA #include <lzma.h> @@ -358,4 +360,3 @@ tor_lzma_init(void) { atomic_counter_init(&total_lzma_allocation); } - diff --git a/src/lib/compress/compress_none.c b/src/lib/compress/compress_none.c index 11f99d82e6..9574c47a7e 100644 --- a/src/lib/compress/compress_none.c +++ b/src/lib/compress/compress_none.c @@ -16,10 +16,12 @@ #include "orconfig.h" -#include "common/util.h" #include "lib/log/torlog.h" #include "lib/compress/compress.h" #include "lib/compress/compress_none.h" +#include "lib/intmath/cmp.h" + +#include <string.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 @@ -50,4 +52,3 @@ tor_cnone_compress_process(char **out, size_t *out_len, return TOR_COMPRESS_BUFFER_FULL; } } - diff --git a/src/lib/compress/compress_zlib.c b/src/lib/compress/compress_zlib.c index 7cba1150ed..12e6727dee 100644 --- a/src/lib/compress/compress_zlib.c +++ b/src/lib/compress/compress_zlib.c @@ -13,10 +13,11 @@ #include "orconfig.h" -#include "common/util.h" #include "lib/log/torlog.h" +#include "lib/log/util_bug.h" #include "lib/compress/compress.h" #include "lib/compress/compress_zlib.h" +#include "lib/thread/threads.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 @@ -301,4 +302,3 @@ tor_zlib_init(void) { atomic_counter_init(&total_zlib_allocation); } - diff --git a/src/lib/compress/compress_zstd.c b/src/lib/compress/compress_zstd.c index f24c7a5abc..0a553db55c 100644 --- a/src/lib/compress/compress_zstd.c +++ b/src/lib/compress/compress_zstd.c @@ -13,10 +13,12 @@ #include "orconfig.h" -#include "common/util.h" #include "lib/log/torlog.h" +#include "lib/log/util_bug.h" #include "lib/compress/compress.h" #include "lib/compress/compress_zstd.h" +#include "lib/string/printf.h" +#include "lib/thread/threads.h" #ifdef ENABLE_ZSTD_ADVANCED_APIS /* This is a lie, but we make sure it doesn't get us in trouble by wrapping @@ -533,4 +535,3 @@ tor_zstd_set_static_apis_disabled_for_testing(int disabled) static_apis_disable_for_testing = disabled; } #endif - |