diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-21 11:51:49 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-21 13:08:25 -0400 |
commit | 2d20cbf837263898ce45c1e0a0f11b9e1126eeba (patch) | |
tree | 3af09a830bb62117ec3ddc9d2ea907f861d289ff | |
parent | ad7776f66d3e914a0842c20f31162c0e11befa34 (diff) | |
download | tor-2d20cbf837263898ce45c1e0a0f11b9e1126eeba.tar.gz tor-2d20cbf837263898ce45c1e0a0f11b9e1126eeba.zip |
Extract compression functions into a new library.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | src/common/include.am | 10 | ||||
-rw-r--r-- | src/include.am | 1 | ||||
-rw-r--r-- | src/lib/compress/compress.c (renamed from src/common/compress.c) | 0 | ||||
-rw-r--r-- | src/lib/compress/compress.h (renamed from src/common/compress.h) | 0 | ||||
-rw-r--r-- | src/lib/compress/compress_lzma.c (renamed from src/common/compress_lzma.c) | 0 | ||||
-rw-r--r-- | src/lib/compress/compress_lzma.h (renamed from src/common/compress_lzma.h) | 0 | ||||
-rw-r--r-- | src/lib/compress/compress_none.c (renamed from src/common/compress_none.c) | 0 | ||||
-rw-r--r-- | src/lib/compress/compress_none.h (renamed from src/common/compress_none.h) | 0 | ||||
-rw-r--r-- | src/lib/compress/compress_zlib.c (renamed from src/common/compress_zlib.c) | 0 | ||||
-rw-r--r-- | src/lib/compress/compress_zlib.h (renamed from src/common/compress_zlib.h) | 0 | ||||
-rw-r--r-- | src/lib/compress/compress_zstd.c (renamed from src/common/compress_zstd.c) | 0 | ||||
-rw-r--r-- | src/lib/compress/compress_zstd.h (renamed from src/common/compress_zstd.h) | 0 | ||||
-rw-r--r-- | src/lib/compress/include.am | 25 |
15 files changed, 30 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore index 2267f5b4f6..14ab9f63c8 100644 --- a/.gitignore +++ b/.gitignore @@ -167,6 +167,8 @@ uptime-*.json /src/ext/keccak-tiny/libkeccak-tiny.lib # /src/lib +/src/lib/libtor-compress.a +/src/lib/libtor-compress-testing.a /src/lib/libtor-ctime.a /src/lib/libtor-ctime-testing.a /src/lib/libtor-err.a diff --git a/Makefile.am b/Makefile.am index 59230ab752..5b229d073d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -66,6 +66,7 @@ TOR_CRYPTO_TESTING_LIBS = \ # All static libraries used to link tor. TOR_INTERNAL_LIBS = \ src/or/libtor-app.a \ + src/lib/libtor-compress.a \ $(TOR_CRYPTO_LIBS) \ $(TOR_UTIL_LIBS) \ src/common/libor-event.a \ @@ -76,10 +77,9 @@ TOR_INTERNAL_LIBS = \ # and tests) TOR_INTERNAL_TESTING_LIBS = \ src/or/libtor-app-testing.a \ + src/lib/libtor-compress-testing.a \ $(TOR_CRYPTO_TESTING_LIBS) \ $(TOR_UTIL_TESTING_LIBS) \ - $(LIBKECCAK_TINY) \ - $(LIBDONNA) \ src/common/libor-event-testing.a \ src/trunnel/libor-trunnel-testing.a \ src/trace/libor-trace.a diff --git a/src/common/include.am b/src/common/include.am index fa12888ac0..5ed4b3c6dd 100644 --- a/src/common/include.am +++ b/src/common/include.am @@ -87,11 +87,6 @@ src/common/src_common_libor_testing_a-log.$(OBJEXT) \ LIBOR_CRYPTO_A_SRC = \ src/common/aes.c \ src/common/buffers_tls.c \ - src/common/compress.c \ - src/common/compress_lzma.c \ - src/common/compress_none.c \ - src/common/compress_zlib.c \ - src/common/compress_zstd.c \ src/common/crypto.c \ src/common/crypto_dh.c \ src/common/crypto_digest.c \ @@ -147,11 +142,6 @@ COMMONHEADERS = \ src/common/compat_openssl.h \ src/common/compat_threads.h \ src/common/compat_time.h \ - src/common/compress.h \ - src/common/compress_lzma.h \ - src/common/compress_none.h \ - src/common/compress_zlib.h \ - src/common/compress_zstd.h \ src/common/confline.h \ src/common/container.h \ src/common/crypto.h \ diff --git a/src/include.am b/src/include.am index 296ac19b14..a7b266aa37 100644 --- a/src/include.am +++ b/src/include.am @@ -1,6 +1,7 @@ include src/ext/include.am include src/lib/err/include.am include src/lib/ctime/include.am +include src/lib/compress/include.am include src/common/include.am include src/trunnel/include.am include src/or/include.am diff --git a/src/common/compress.c b/src/lib/compress/compress.c index 44bb891af4..44bb891af4 100644 --- a/src/common/compress.c +++ b/src/lib/compress/compress.c diff --git a/src/common/compress.h b/src/lib/compress/compress.h index 10ad6d86bc..10ad6d86bc 100644 --- a/src/common/compress.h +++ b/src/lib/compress/compress.h diff --git a/src/common/compress_lzma.c b/src/lib/compress/compress_lzma.c index 363dc1fb92..363dc1fb92 100644 --- a/src/common/compress_lzma.c +++ b/src/lib/compress/compress_lzma.c diff --git a/src/common/compress_lzma.h b/src/lib/compress/compress_lzma.h index 9ef3382a25..9ef3382a25 100644 --- a/src/common/compress_lzma.h +++ b/src/lib/compress/compress_lzma.h diff --git a/src/common/compress_none.c b/src/lib/compress/compress_none.c index 7e67046d34..7e67046d34 100644 --- a/src/common/compress_none.c +++ b/src/lib/compress/compress_none.c diff --git a/src/common/compress_none.h b/src/lib/compress/compress_none.h index 5c395bbb30..5c395bbb30 100644 --- a/src/common/compress_none.h +++ b/src/lib/compress/compress_none.h diff --git a/src/common/compress_zlib.c b/src/lib/compress/compress_zlib.c index 663e27f794..663e27f794 100644 --- a/src/common/compress_zlib.c +++ b/src/lib/compress/compress_zlib.c diff --git a/src/common/compress_zlib.h b/src/lib/compress/compress_zlib.h index 7af68044de..7af68044de 100644 --- a/src/common/compress_zlib.h +++ b/src/lib/compress/compress_zlib.h diff --git a/src/common/compress_zstd.c b/src/lib/compress/compress_zstd.c index dc0dcdec93..dc0dcdec93 100644 --- a/src/common/compress_zstd.c +++ b/src/lib/compress/compress_zstd.c diff --git a/src/common/compress_zstd.h b/src/lib/compress/compress_zstd.h index 1177537a9e..1177537a9e 100644 --- a/src/common/compress_zstd.h +++ b/src/lib/compress/compress_zstd.h diff --git a/src/lib/compress/include.am b/src/lib/compress/include.am new file mode 100644 index 0000000000..eb3a89c355 --- /dev/null +++ b/src/lib/compress/include.am @@ -0,0 +1,25 @@ + +noinst_LIBRARIES += src/lib/libtor-compress.a + +if UNITTESTS_ENABLED +noinst_LIBRARIES += src/lib/libtor-compress-testing.a +endif + +src_lib_libtor_compress_a_SOURCES = \ + src/lib/compress/compress.c \ + src/lib/compress/compress_lzma.c \ + src/lib/compress/compress_none.c \ + src/lib/compress/compress_zlib.c \ + src/lib/compress/compress_zstd.c + +src_lib_libtor_compress_testing_a_SOURCES = \ + $(src_lib_libtor_compress_a_SOURCES) +src_lib_libtor_compress_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS) +src_lib_libtor_compress_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS) + +noinst_HEADERS += \ + src/lib/compress/compress.h \ + src/lib/compress/compress_lzma.h \ + src/lib/compress/compress_none.h \ + src/lib/compress/compress_zlib.h \ + src/lib/compress/compress_zstd.h |