diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-21 15:39:36 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-22 09:49:13 -0400 |
commit | 77dff00b18fc70acdb2939dd20197a0044d41fe5 (patch) | |
tree | 10e6d35e4e59b0630fa3eb38482f6314554aa81a | |
parent | f95e3bf5fc4e2d5fef42b86d81f155c00b1983ac (diff) | |
download | tor-77dff00b18fc70acdb2939dd20197a0044d41fe5.tar.gz tor-77dff00b18fc70acdb2939dd20197a0044d41fe5.zip |
Refactor container into a library.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | src/common/include.am | 2 | ||||
-rw-r--r-- | src/include.am | 1 | ||||
-rw-r--r-- | src/lib/container/container.c (renamed from src/common/container.c) | 0 | ||||
-rw-r--r-- | src/lib/container/container.h (renamed from src/common/container.h) | 0 | ||||
-rw-r--r-- | src/lib/container/include.am | 17 | ||||
-rw-r--r-- | src/rust/build.rs | 1 |
8 files changed, 23 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore index c5da8e423e..deb3693811 100644 --- a/.gitignore +++ b/.gitignore @@ -165,6 +165,8 @@ uptime-*.json /src/lib/libcurve25519_donna.a /src/lib/libtor-compress.a /src/lib/libtor-compress-testing.a +/src/lib/libtor-container.a +/src/lib/libtor-container-testing.a /src/lib/libtor-crypt-ops.a /src/lib/libtor-crypt-ops-testing.a /src/lib/libtor-ctime.a diff --git a/Makefile.am b/Makefile.am index 960417df9d..1b71e478f9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,6 +40,7 @@ endif # "Common" libraries used to link tor's utility code. TOR_UTIL_LIBS = \ src/common/libor.a \ + src/lib/libtor-container.a \ src/lib/libtor-malloc.a \ src/lib/libtor-err.a \ src/lib/libtor-ctime.a @@ -48,6 +49,7 @@ TOR_UTIL_LIBS = \ # and tests) TOR_UTIL_TESTING_LIBS = \ src/common/libor-testing.a \ + src/lib/libtor-container-testing.a \ src/lib/libtor-malloc-testing.a \ src/lib/libtor-err-testing.a \ src/lib/libtor-ctime-testing.a diff --git a/src/common/include.am b/src/common/include.am index 29bbdd7696..4223978866 100644 --- a/src/common/include.am +++ b/src/common/include.am @@ -38,7 +38,6 @@ LIBOR_A_SRC = \ src/common/compat_threads.c \ src/common/compat_time.c \ src/common/confline.c \ - src/common/container.c \ src/common/log.c \ src/common/memarea.c \ src/common/util.c \ @@ -87,7 +86,6 @@ COMMONHEADERS = \ src/common/compat_threads.h \ src/common/compat_time.h \ src/common/confline.h \ - src/common/container.h \ src/common/handles.h \ src/common/memarea.h \ src/common/linux_syscalls.inc \ diff --git a/src/include.am b/src/include.am index 46569a4b44..9fa901c413 100644 --- a/src/include.am +++ b/src/include.am @@ -3,6 +3,7 @@ include src/lib/err/include.am include src/lib/cc/include.am include src/lib/ctime/include.am include src/lib/compress/include.am +include src/lib/container/include.am include src/lib/crypt_ops/include.am include src/lib/include.libdonna.am include src/lib/malloc/include.am diff --git a/src/common/container.c b/src/lib/container/container.c index a7810ba90b..a7810ba90b 100644 --- a/src/common/container.c +++ b/src/lib/container/container.c diff --git a/src/common/container.h b/src/lib/container/container.h index c45bfc359b..c45bfc359b 100644 --- a/src/common/container.h +++ b/src/lib/container/container.h diff --git a/src/lib/container/include.am b/src/lib/container/include.am new file mode 100644 index 0000000000..d7648c80c0 --- /dev/null +++ b/src/lib/container/include.am @@ -0,0 +1,17 @@ + +noinst_LIBRARIES += src/lib/libtor-container.a + +if UNITTESTS_ENABLED +noinst_LIBRARIES += src/lib/libtor-container-testing.a +endif + +src_lib_libtor_container_a_SOURCES = \ + src/lib/container/container.c + +src_lib_libtor_container_testing_a_SOURCES = \ + $(src_lib_libtor_container_a_SOURCES) +src_lib_libtor_container_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS) +src_lib_libtor_container_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS) + +noinst_HEADERS += \ + src/lib/container/container.h diff --git a/src/rust/build.rs b/src/rust/build.rs index acbedd4d40..a4f38d3b46 100644 --- a/src/rust/build.rs +++ b/src/rust/build.rs @@ -151,6 +151,7 @@ pub fn main() { // moving forward! cfg.component("tor-crypt-ops-testing"); cfg.component("or-testing"); + cfg.component("tor-container-testing"); cfg.component("tor-malloc"); cfg.component("tor-err-testing"); cfg.component("or-event-testing"); |