All remaining files in src/common belong to the event loop.

This commit is contained in:
Nick Mathewson 2018-07-05 15:13:44 -04:00
parent 947de40d19
commit 1e417b7275
18 changed files with 47 additions and 98 deletions

15
.gitignore vendored
View File

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

View File

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

View File

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

View File

@ -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)

View File

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

View File

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

26
src/lib/evloop/include.am Normal file
View File

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

View File

@ -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) \