aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/buf/.may_include10
-rw-r--r--src/lib/buf/buffers.c (renamed from src/lib/container/buffers.c)2
-rw-r--r--src/lib/buf/buffers.h (renamed from src/lib/container/buffers.h)0
-rw-r--r--src/lib/buf/include.am17
-rw-r--r--src/lib/compress/.may_include1
-rw-r--r--src/lib/compress/compress_buf.c2
-rw-r--r--src/lib/container/.may_include3
-rw-r--r--src/lib/container/include.am2
-rw-r--r--src/lib/net/.may_include1
-rw-r--r--src/lib/net/buffers_net.c2
-rw-r--r--src/lib/tls/.may_include1
-rw-r--r--src/lib/tls/buffers_tls.c2
12 files changed, 34 insertions, 9 deletions
diff --git a/src/lib/buf/.may_include b/src/lib/buf/.may_include
new file mode 100644
index 0000000000..c4be73bce2
--- /dev/null
+++ b/src/lib/buf/.may_include
@@ -0,0 +1,10 @@
+orconfig.h
+
+lib/buf/*.h
+lib/cc/*.h
+lib/ctime/*.h
+lib/malloc/*.h
+lib/testsupport/*.h
+lib/log/*.h
+lib/string/*.h
+lib/time/*.h
diff --git a/src/lib/container/buffers.c b/src/lib/buf/buffers.c
index 87d782d7ef..495c5ec453 100644
--- a/src/lib/container/buffers.c
+++ b/src/lib/buf/buffers.c
@@ -25,7 +25,7 @@
#define BUFFERS_PRIVATE
#include "orconfig.h"
#include <stddef.h>
-#include "lib/container/buffers.h"
+#include "lib/buf/buffers.h"
#include "lib/cc/torint.h"
#include "lib/log/log.h"
#include "lib/log/util_bug.h"
diff --git a/src/lib/container/buffers.h b/src/lib/buf/buffers.h
index c48f83cfc7..c48f83cfc7 100644
--- a/src/lib/container/buffers.h
+++ b/src/lib/buf/buffers.h
diff --git a/src/lib/buf/include.am b/src/lib/buf/include.am
new file mode 100644
index 0000000000..3338c3dbdb
--- /dev/null
+++ b/src/lib/buf/include.am
@@ -0,0 +1,17 @@
+
+noinst_LIBRARIES += src/lib/libtor-buf.a
+
+if UNITTESTS_ENABLED
+noinst_LIBRARIES += src/lib/libtor-buf-testing.a
+endif
+
+src_lib_libtor_buf_a_SOURCES = \
+ src/lib/buf/buffers.c
+
+src_lib_libtor_buf_testing_a_SOURCES = \
+ $(src_lib_libtor_buf_a_SOURCES)
+src_lib_libtor_buf_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
+src_lib_libtor_buf_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
+
+noinst_HEADERS += \
+ src/lib/buf/buffers.h
diff --git a/src/lib/compress/.may_include b/src/lib/compress/.may_include
index 4870259ec9..6cd80086e6 100644
--- a/src/lib/compress/.may_include
+++ b/src/lib/compress/.may_include
@@ -1,5 +1,6 @@
orconfig.h
lib/arch/*.h
+lib/buf/*.h
lib/cc/*.h
lib/compress/*.h
lib/container/*.h
diff --git a/src/lib/compress/compress_buf.c b/src/lib/compress/compress_buf.c
index 63ee9e0102..ecf76ee078 100644
--- a/src/lib/compress/compress_buf.c
+++ b/src/lib/compress/compress_buf.c
@@ -11,7 +11,7 @@
#define BUFFERS_PRIVATE
#include "lib/cc/compat_compiler.h"
-#include "lib/container/buffers.h"
+#include "lib/buf/buffers.h"
#include "lib/compress/compress.h"
#include "lib/log/util_bug.h"
diff --git a/src/lib/container/.may_include b/src/lib/container/.may_include
index 90de5eda40..76e5843728 100644
--- a/src/lib/container/.may_include
+++ b/src/lib/container/.may_include
@@ -11,8 +11,5 @@ lib/testsupport/testsupport.h
lib/intmath/*.h
lib/log/*.h
-# XXXX I am unsure about this one. It's only here for buffers.c
-lib/time/*.h
-
ht.h
siphash.h
diff --git a/src/lib/container/include.am b/src/lib/container/include.am
index e6492098b5..032e4033da 100644
--- a/src/lib/container/include.am
+++ b/src/lib/container/include.am
@@ -7,7 +7,6 @@ endif
src_lib_libtor_container_a_SOURCES = \
src/lib/container/bloomfilt.c \
- src/lib/container/buffers.c \
src/lib/container/map.c \
src/lib/container/order.c \
src/lib/container/smartlist.c
@@ -20,7 +19,6 @@ src_lib_libtor_container_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
noinst_HEADERS += \
src/lib/container/bitarray.h \
src/lib/container/bloomfilt.h \
- src/lib/container/buffers.h \
src/lib/container/handles.h \
src/lib/container/map.h \
src/lib/container/order.h \
diff --git a/src/lib/net/.may_include b/src/lib/net/.may_include
index f93f0e1552..d34aaed2ca 100644
--- a/src/lib/net/.may_include
+++ b/src/lib/net/.may_include
@@ -3,6 +3,7 @@ siphash.h
ht.h
lib/arch/*.h
+lib/buf/*.h
lib/cc/*.h
lib/container/*.h
lib/ctime/*.h
diff --git a/src/lib/net/buffers_net.c b/src/lib/net/buffers_net.c
index c52ea2784e..b0936e9928 100644
--- a/src/lib/net/buffers_net.c
+++ b/src/lib/net/buffers_net.c
@@ -11,7 +11,7 @@
#define BUFFERS_PRIVATE
#include "lib/net/buffers_net.h"
-#include "lib/container/buffers.h"
+#include "lib/buf/buffers.h"
#include "lib/log/log.h"
#include "lib/log/util_bug.h"
#include "lib/net/nettypes.h"
diff --git a/src/lib/tls/.may_include b/src/lib/tls/.may_include
index 79301bc318..069181b70e 100644
--- a/src/lib/tls/.may_include
+++ b/src/lib/tls/.may_include
@@ -1,6 +1,7 @@
orconfig.h
lib/arch/*.h
+lib/buf/*.h
lib/cc/*.h
lib/container/*.h
lib/crypt_ops/*.h
diff --git a/src/lib/tls/buffers_tls.c b/src/lib/tls/buffers_tls.c
index 69ae4f7fc0..b4059292ea 100644
--- a/src/lib/tls/buffers_tls.c
+++ b/src/lib/tls/buffers_tls.c
@@ -12,7 +12,7 @@
#define BUFFERS_PRIVATE
#include "orconfig.h"
#include <stddef.h>
-#include "lib/container/buffers.h"
+#include "lib/buf/buffers.h"
#include "lib/tls/buffers_tls.h"
#include "lib/cc/torint.h"
#include "lib/log/log.h"