diff options
-rw-r--r-- | .gitignore | 15 | ||||
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | src/common/Makefile.nmake | 28 | ||||
-rw-r--r-- | src/common/include.am | 51 | ||||
-rw-r--r-- | src/include.am | 2 | ||||
-rw-r--r-- | src/lib/evloop/.may_include | 15 | ||||
-rw-r--r-- | src/lib/evloop/compat_libevent.c (renamed from src/common/compat_libevent.c) | 0 | ||||
-rw-r--r-- | src/lib/evloop/compat_libevent.h (renamed from src/common/compat_libevent.h) | 0 | ||||
-rw-r--r-- | src/lib/evloop/include.am | 26 | ||||
-rw-r--r-- | src/lib/evloop/procmon.c (renamed from src/common/procmon.c) | 0 | ||||
-rw-r--r-- | src/lib/evloop/procmon.h (renamed from src/common/procmon.h) | 0 | ||||
-rw-r--r-- | src/lib/evloop/timers.c (renamed from src/common/timers.c) | 0 | ||||
-rw-r--r-- | src/lib/evloop/timers.h (renamed from src/common/timers.h) | 0 | ||||
-rw-r--r-- | src/lib/evloop/token_bucket.c (renamed from src/common/token_bucket.c) | 0 | ||||
-rw-r--r-- | src/lib/evloop/token_bucket.h (renamed from src/common/token_bucket.h) | 0 | ||||
-rw-r--r-- | src/lib/evloop/workqueue.c (renamed from src/common/workqueue.c) | 0 | ||||
-rw-r--r-- | src/lib/evloop/workqueue.h (renamed from src/common/workqueue.h) | 0 | ||||
-rw-r--r-- | src/test/include.am | 2 |
18 files changed, 47 insertions, 98 deletions
diff --git a/.gitignore b/.gitignore index b1de1d79d8..7119744504 100644 --- a/.gitignore +++ b/.gitignore @@ -132,19 +132,6 @@ uptime-*.json # /src/trace /src/trace/libor-trace.a -# /src/common/ -/src/common/Makefile -/src/common/Makefile.in -/src/common/libor.a -/src/common/libor-testing.a -/src/common/libor.lib -/src/common/libor-ctime.a -/src/common/libor-ctime-testing.a -/src/common/libor-ctime.lib -/src/common/libor-event.a -/src/common/libor-event-testing.a -/src/common/libor-event.lib - # /src/config/ /src/config/Makefile /src/config/Makefile.in @@ -173,6 +160,8 @@ uptime-*.json /src/lib/libtor-ctime-testing.a /src/lib/libtor-encoding.a /src/lib/libtor-encoding-testing.a +/src/lib/libtor-evloop.a +/src/lib/libtor-evloop-testing.a /src/lib/libtor-err.a /src/lib/libtor-err-testing.a /src/lib/libtor-fdio.a diff --git a/Makefile.am b/Makefile.am index fe2479a642..b2da55cdac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,7 +40,6 @@ endif # "Common" libraries used to link tor's utility code. TOR_UTIL_LIBS = \ - src/common/libor.a \ src/lib/libtor-process.a \ src/lib/libtor-time.a \ src/lib/libtor-fs.a \ @@ -68,7 +67,6 @@ TOR_UTIL_LIBS = \ # Variants of the above for linking the testing variant of tor (for coverage # and tests) TOR_UTIL_TESTING_LIBS = \ - src/common/libor-testing.a \ src/lib/libtor-process-testing.a \ src/lib/libtor-time-testing.a \ src/lib/libtor-fs-testing.a \ @@ -112,9 +110,9 @@ TOR_CRYPTO_TESTING_LIBS = \ TOR_INTERNAL_LIBS = \ src/or/libtor-app.a \ src/lib/libtor-compress.a \ + src/lib/libtor-evloop.a \ $(TOR_CRYPTO_LIBS) \ $(TOR_UTIL_LIBS) \ - src/common/libor-event.a \ src/trunnel/libor-trunnel.a \ src/lib/libtor-trace.a @@ -123,9 +121,9 @@ TOR_INTERNAL_LIBS = \ TOR_INTERNAL_TESTING_LIBS = \ src/or/libtor-app-testing.a \ src/lib/libtor-compress-testing.a \ + src/lib/libtor-evloop-testing.a \ $(TOR_CRYPTO_TESTING_LIBS) \ $(TOR_UTIL_TESTING_LIBS) \ - src/common/libor-event-testing.a \ src/trunnel/libor-trunnel-testing.a \ src/lib/libtor-trace.a diff --git a/src/common/Makefile.nmake b/src/common/Makefile.nmake deleted file mode 100644 index a1c819fffa..0000000000 --- a/src/common/Makefile.nmake +++ /dev/null @@ -1,28 +0,0 @@ -all: libor.lib libor-crypto.lib libor-event.lib - -CFLAGS = /O2 /MT /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common \ - /I ..\ext - -LIBOR_OBJECTS = address.obj backtrace.obj compat.obj container.obj di_ops.obj \ - log.obj memarea.obj mempool.obj procmon.obj sandbox.obj util.obj \ - util_codedigest.obj - -LIBOR_CRYPTO_OBJECTS = aes.obj crypto.obj crypto_format.obj compress.obj compress_zlib.obj \ - tortls.obj crypto_curve25519.obj curve25519-donna.obj - -LIBOR_EVENT_OBJECTS = compat_libevent.obj - -curve25519-donna.obj: ..\ext\curve25519_donna\curve25519-donna.c - $(CC) $(CFLAGS) /D inline=_inline /c ..\ext\curve25519_donna\curve25519-donna.c - -libor.lib: $(LIBOR_OBJECTS) - lib $(LIBOR_OBJECTS) /out:libor.lib - -libor-crypto.lib: $(LIBOR_CRYPTO_OBJECTS) - lib $(LIBOR_CRYPTO_OBJECTS) /out:libor-crypto.lib - -libor-event.lib: $(LIBOR_EVENT_OBJECTS) - lib $(LIBOR_EVENT_OBJECTS) /out:libor-event.lib - -clean: - del *.obj *.lib libor*.lib diff --git a/src/common/include.am b/src/common/include.am deleted file mode 100644 index 8a2d2e1148..0000000000 --- a/src/common/include.am +++ /dev/null @@ -1,51 +0,0 @@ - -noinst_LIBRARIES += \ - src/common/libor.a \ - src/common/libor-event.a - -if UNITTESTS_ENABLED -noinst_LIBRARIES += \ - src/common/libor-testing.a \ - src/common/libor-event-testing.a -endif - -EXTRA_DIST += src/common/Makefile.nmake - -LIBOR_A_SRC = \ - src/common/token_bucket.c \ - src/common/workqueue.c \ - $(libor_extra_source) - -src/common/src_common_libor_testing_a-log.$(OBJEXT) \ - src/common/log.$(OBJEXT): micro-revision.i - -LIBOR_EVENT_A_SRC = \ - src/common/compat_libevent.c \ - src/common/procmon.c \ - src/common/timers.c \ - src/ext/timeouts/timeout.c - -src_common_libor_a_SOURCES = $(LIBOR_A_SRC) -src_common_libor_event_a_SOURCES = $(LIBOR_EVENT_A_SRC) - -if UNITTESTS_ENABLED -src_common_libor_testing_a_SOURCES = $(LIBOR_A_SRC) -src_common_libor_event_testing_a_SOURCES = $(LIBOR_EVENT_A_SRC) -else -src_common_libor_testing_a_SOURCES = -src_common_libor_event_testing_a_SOURCES = -endif - -src_common_libor_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS) -src_common_libor_event_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS) -src_common_libor_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS) -src_common_libor_event_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS) - -COMMONHEADERS = \ - src/common/compat_libevent.h \ - src/common/procmon.h \ - src/common/timers.h \ - src/common/token_bucket.h \ - src/common/workqueue.h - -noinst_HEADERS+= $(COMMONHEADERS) diff --git a/src/include.am b/src/include.am index 1ed07425a6..950f9cc0fe 100644 --- a/src/include.am +++ b/src/include.am @@ -8,6 +8,7 @@ include src/lib/container/include.am include src/lib/crypt_ops/include.am include src/lib/defs/include.am include src/lib/encoding/include.am +include src/lib/evloop/include.am include src/lib/fdio/include.am include src/lib/fs/include.am include src/lib/include.libdonna.am @@ -31,7 +32,6 @@ include src/lib/time/include.am include src/lib/tls/include.am include src/lib/trace/include.am include src/lib/wallclock/include.am -include src/common/include.am include src/trunnel/include.am include src/or/include.am include src/rust/include.am diff --git a/src/lib/evloop/.may_include b/src/lib/evloop/.may_include new file mode 100644 index 0000000000..205f41b38f --- /dev/null +++ b/src/lib/evloop/.may_include @@ -0,0 +1,15 @@ +orconfig.h + +lib/cc/*.h +lib/crypt_ops/*.h +lib/evloop/*.h +lib/intmath/*.h +lib/log/*.h +lib/malloc/*.h +lib/net/*.h +lib/string/*.h +lib/testsupport/*.h +lib/thread/*.h +lib/time/*.h + +src/ext/timeouts/timeout.c diff --git a/src/common/compat_libevent.c b/src/lib/evloop/compat_libevent.c index 9d21cf20bd..9d21cf20bd 100644 --- a/src/common/compat_libevent.c +++ b/src/lib/evloop/compat_libevent.c diff --git a/src/common/compat_libevent.h b/src/lib/evloop/compat_libevent.h index 0a50cfa667..0a50cfa667 100644 --- a/src/common/compat_libevent.h +++ b/src/lib/evloop/compat_libevent.h diff --git a/src/lib/evloop/include.am b/src/lib/evloop/include.am new file mode 100644 index 0000000000..6b0076272a --- /dev/null +++ b/src/lib/evloop/include.am @@ -0,0 +1,26 @@ + +noinst_LIBRARIES += src/lib/libtor-evloop.a + +if UNITTESTS_ENABLED +noinst_LIBRARIES += src/lib/libtor-evloop-testing.a +endif + +src_lib_libtor_evloop_a_SOURCES = \ + src/lib/evloop/compat_libevent.c \ + src/lib/evloop/procmon.c \ + src/lib/evloop/timers.c \ + src/lib/evloop/token_bucket.c \ + src/lib/evloop/workqueue.c + + +src_lib_libtor_evloop_testing_a_SOURCES = \ + $(src_lib_libtor_evloop_a_SOURCES) +src_lib_libtor_evloop_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS) +src_lib_libtor_evloop_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS) + +noinst_HEADERS += \ + src/lib/evloop/compat_libevent.h \ + src/lib/evloop/procmon.h \ + src/lib/evloop/timers.h \ + src/lib/evloop/token_bucket.h \ + src/lib/evloop/workqueue.h diff --git a/src/common/procmon.c b/src/lib/evloop/procmon.c index 6c2b3e71e5..6c2b3e71e5 100644 --- a/src/common/procmon.c +++ b/src/lib/evloop/procmon.c diff --git a/src/common/procmon.h b/src/lib/evloop/procmon.h index b8daeed0db..b8daeed0db 100644 --- a/src/common/procmon.h +++ b/src/lib/evloop/procmon.h diff --git a/src/common/timers.c b/src/lib/evloop/timers.c index ff92a2e447..ff92a2e447 100644 --- a/src/common/timers.c +++ b/src/lib/evloop/timers.c diff --git a/src/common/timers.h b/src/lib/evloop/timers.h index 2348c7b7c1..2348c7b7c1 100644 --- a/src/common/timers.h +++ b/src/lib/evloop/timers.h diff --git a/src/common/token_bucket.c b/src/lib/evloop/token_bucket.c index f7b092f612..f7b092f612 100644 --- a/src/common/token_bucket.c +++ b/src/lib/evloop/token_bucket.c diff --git a/src/common/token_bucket.h b/src/lib/evloop/token_bucket.h index 787317fa1f..787317fa1f 100644 --- a/src/common/token_bucket.h +++ b/src/lib/evloop/token_bucket.h diff --git a/src/common/workqueue.c b/src/lib/evloop/workqueue.c index e5254396f9..e5254396f9 100644 --- a/src/common/workqueue.c +++ b/src/lib/evloop/workqueue.c diff --git a/src/common/workqueue.h b/src/lib/evloop/workqueue.h index 4e5c424be6..4e5c424be6 100644 --- a/src/common/workqueue.h +++ b/src/lib/evloop/workqueue.h diff --git a/src/test/include.am b/src/test/include.am index 827b780ce3..a749ff1436 100644 --- a/src/test/include.am +++ b/src/test/include.am @@ -271,7 +271,7 @@ src_test_test_workqueue_LDADD = \ src_test_test_timers_CPPFLAGS = $(src_test_test_CPPFLAGS) src_test_test_timers_CFLAGS = $(src_test_test_CFLAGS) src_test_test_timers_LDADD = \ - src/common/libor-event-testing.a \ + src/lib/libtor-evloop-testing.a \ $(TOR_CRYPTO_TESTING_LIBS) \ $(TOR_UTIL_TESTING_LIBS) \ $(rust_ldadd) \ |