Explorar o código

Move all externally maintained source files into src/ext

The rationale for treating these files differently is that we should
be checking upstream for changes as applicable, and merging changes
upstream as warranted.
Nick Mathewson %!s(int64=11) %!d(string=hai) anos
pai
achega
63f542a5c2

+ 3 - 0
changes/src_ext

@@ -0,0 +1,3 @@
+  o Code refactoring:
+    - Source files taken from other packages now reside in src/ext;
+      previously they were scattered around the rest of Tor.

+ 1 - 2
src/common/include.am

@@ -9,7 +9,7 @@ EXTRA_DIST+= \
 AM_CPPFLAGS += -I$(srcdir)/src/common -Isrc/common
 
 if USE_OPENBSD_MALLOC
-libor_extra_source=src/common/OpenBSD_malloc_Linux.c
+libor_extra_source=src/ext/OpenBSD_malloc_Linux.c
 else
 libor_extra_source=
 endif
@@ -44,7 +44,6 @@ COMMONHEADERS = \
   src/common/container.h			\
   src/common/crypto.h				\
   src/common/di_ops.h				\
-  src/common/ht.h				\
   src/common/memarea.h				\
   src/common/mempool.h				\
   src/common/procmon.h				\

+ 0 - 0
src/common/OpenBSD_malloc_Linux.c → src/ext/OpenBSD_malloc_Linux.c


+ 0 - 0
src/or/eventdns.c → src/ext/eventdns.c


+ 0 - 0
src/or/eventdns.h → src/ext/eventdns.h


+ 0 - 0
src/common/ht.h → src/ext/ht.h


+ 12 - 0
src/ext/include.am

@@ -0,0 +1,12 @@
+
+AM_CPPFLAGS += -I$(srcdir)/src/ext -Isrc/ext
+
+EXTHEADERS = \
+  src/ext/ht.h		\
+  src/ext/eventdns.h	\
+  src/ext/tinytest.h	\
+  src/ext/tinytest_macros.h
+
+noinst_HEADERS+= $(EXTHEADERS)
+
+

+ 0 - 0
src/test/tinytest.c → src/ext/tinytest.c


+ 0 - 0
src/test/tinytest.h → src/ext/tinytest.h


+ 0 - 0
src/test/tinytest_demo.c → src/ext/tinytest_demo.c


+ 0 - 0
src/test/tinytest_macros.h → src/ext/tinytest_macros.h


+ 2 - 1
src/include.am

@@ -1,6 +1,7 @@
+include src/ext/include.am
 include src/common/include.am
 include src/or/include.am
 include src/test/include.am
 include src/tools/include.am
 include src/win32/include.am
-include src/config/include.am
+include src/config/include.am

+ 1 - 2
src/or/include.am

@@ -12,7 +12,7 @@ EXTRA_DIST+= src/or/ntmain.c src/or/or_sha1.i src/or/Makefile.nmake
 if USE_EXTERNAL_EVDNS
 evdns_source=
 else
-evdns_source=src/or/eventdns.c
+evdns_source=src/ext/eventdns.c
 endif
 
 src_or_libtor_a_SOURCES = \
@@ -110,7 +110,6 @@ ORHEADERS = \
 	src/or/dirvote.h				\
 	src/or/dns.h					\
 	src/or/dnsserv.h				\
-	src/or/eventdns.h				\
 	src/or/eventdns_tor.h				\
 	src/or/geoip.h					\
 	src/or/hibernate.h				\

+ 2 - 5
src/test/include.am

@@ -5,7 +5,7 @@ noinst_PROGRAMS+= src/test/test src/test/test-child src/test/bench
 src_test_AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \
         -DLOCALSTATEDIR="\"$(localstatedir)\"" \
         -DBINDIR="\"$(bindir)\""	       \
-	-I"$(top_srcdir)/src/or"
+	-I"$(top_srcdir)/src/or" -I"$(top_srcdir)/src/ext"
 
 # -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
 # This seems to matter nowhere but on Windows, but I assure you that it
@@ -24,7 +24,7 @@ src_test_test_SOURCES = \
 	src/test/test_replay.c \
 	src/test/test_util.c \
 	src/test/test_config.c \
-	src/test/tinytest.c
+	src/ext/tinytest.c
 
 src_test_test_CPPFLAGS= $(src_test_AM_CPPFLAGS)
 
@@ -48,8 +48,5 @@ src_test_bench_LDADD = src/or/libtor.a src/common/libor.a src/common/libor-crypt
 	@TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@
 
 noinst_HEADERS+= \
-	src/test/tinytest.h \
-	src/test/tinytest_macros.h \
 	src/test/test.h
 
-