From 42890b9acf50c4406b61b3b37078c00ec79411fa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Feb 2015 21:46:23 +0100 Subject: [PATCH] system/{Resolver,Socket{Error,Util}}: move to new library libnet.a --- Makefile.am | 15 +++++++++++---- src/client/ClientNew.cxx | 2 +- src/event/BufferedSocket.cxx | 2 +- src/event/FullyBufferedSocket.cxx | 2 +- src/event/ServerSocket.cxx | 6 +++--- src/{system => net}/Resolver.cxx | 0 src/{system => net}/Resolver.hxx | 0 src/{system => net}/SocketError.cxx | 0 src/{system => net}/SocketError.hxx | 0 src/{system => net}/SocketUtil.cxx | 2 +- src/{system => net}/SocketUtil.hxx | 0 src/output/plugins/httpd/HttpdClient.cxx | 2 +- src/output/plugins/httpd/HttpdOutputPlugin.cxx | 2 +- test/run_resolver.cxx | 2 +- 14 files changed, 21 insertions(+), 14 deletions(-) rename src/{system => net}/Resolver.cxx (100%) rename src/{system => net}/Resolver.hxx (100%) rename src/{system => net}/SocketError.cxx (100%) rename src/{system => net}/SocketError.hxx (100%) rename src/{system => net}/SocketUtil.cxx (98%) rename src/{system => net}/SocketUtil.hxx (100%) diff --git a/Makefile.am b/Makefile.am index 1f263e6d5..e7061237f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,6 +15,7 @@ noinst_LIBRARIES = \ libmpd.a \ libutil.a \ libthread.a \ + libnet.a \ libsystem.a \ libevent.a \ libicu.a \ @@ -55,6 +56,7 @@ src_mpd_LDADD = \ libconf.a \ libevent.a \ libthread.a \ + libnet.a \ libsystem.a \ libutil.a \ $(FS_LIBS) \ @@ -415,15 +417,19 @@ libthread_a_SOURCES = \ src/thread/Thread.cxx src/thread/Thread.hxx \ src/thread/Id.hxx +# Networking library + +libnet_a_SOURCES = \ + src/net/Resolver.cxx src/net/Resolver.hxx \ + src/net/SocketUtil.cxx src/net/SocketUtil.hxx \ + src/net/SocketError.cxx src/net/SocketError.hxx + # System library libsystem_a_SOURCES = \ src/system/ByteOrder.hxx \ src/system/FatalError.cxx src/system/FatalError.hxx \ src/system/fd_util.c src/system/fd_util.h \ - src/system/SocketUtil.cxx src/system/SocketUtil.hxx \ - src/system/SocketError.cxx src/system/SocketError.hxx \ - src/system/Resolver.cxx src/system/Resolver.hxx \ src/system/EventPipe.cxx src/system/EventPipe.hxx \ src/system/EventFD.cxx src/system/EventFD.hxx \ src/system/SignalFD.cxx src/system/SignalFD.hxx \ @@ -1567,7 +1573,7 @@ test_read_conf_SOURCES = \ test/read_conf.cxx test_run_resolver_LDADD = \ - libsystem.a \ + libnet.a \ libutil.a \ $(GLIB_LIBS) test_run_resolver_SOURCES = \ @@ -1948,6 +1954,7 @@ test_run_output_LDADD = $(MPD_LIBS) \ libevent.a \ $(FS_LIBS) \ $(ICU_LDADD) \ + libnet.a \ libsystem.a \ libthread.a \ libutil.a \ diff --git a/src/client/ClientNew.cxx b/src/client/ClientNew.cxx index c820fc584..2b6941fd0 100644 --- a/src/client/ClientNew.cxx +++ b/src/client/ClientNew.cxx @@ -23,7 +23,7 @@ #include "Partition.hxx" #include "Instance.hxx" #include "system/fd_util.h" -#include "system/Resolver.hxx" +#include "net/Resolver.hxx" #include "Permission.hxx" #include "util/Error.hxx" #include "Log.hxx" diff --git a/src/event/BufferedSocket.cxx b/src/event/BufferedSocket.cxx index 97df66483..40aea6618 100644 --- a/src/event/BufferedSocket.cxx +++ b/src/event/BufferedSocket.cxx @@ -19,7 +19,7 @@ #include "config.h" #include "BufferedSocket.hxx" -#include "system/SocketError.hxx" +#include "net/SocketError.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" #include "Compiler.h" diff --git a/src/event/FullyBufferedSocket.cxx b/src/event/FullyBufferedSocket.cxx index 6e52e704c..ba7f7b455 100644 --- a/src/event/FullyBufferedSocket.cxx +++ b/src/event/FullyBufferedSocket.cxx @@ -19,7 +19,7 @@ #include "config.h" #include "FullyBufferedSocket.hxx" -#include "system/SocketError.hxx" +#include "net/SocketError.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" #include "Compiler.h" diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index 67d2368ee..daf8517fc 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -19,10 +19,10 @@ #include "config.h" #include "ServerSocket.hxx" -#include "system/SocketUtil.hxx" -#include "system/SocketError.hxx" +#include "net/SocketUtil.hxx" +#include "net/SocketError.hxx" +#include "net/Resolver.hxx" #include "event/SocketMonitor.hxx" -#include "system/Resolver.hxx" #include "system/fd_util.h" #include "fs/AllocatedPath.hxx" #include "fs/FileSystem.hxx" diff --git a/src/system/Resolver.cxx b/src/net/Resolver.cxx similarity index 100% rename from src/system/Resolver.cxx rename to src/net/Resolver.cxx diff --git a/src/system/Resolver.hxx b/src/net/Resolver.hxx similarity index 100% rename from src/system/Resolver.hxx rename to src/net/Resolver.hxx diff --git a/src/system/SocketError.cxx b/src/net/SocketError.cxx similarity index 100% rename from src/system/SocketError.cxx rename to src/net/SocketError.cxx diff --git a/src/system/SocketError.hxx b/src/net/SocketError.hxx similarity index 100% rename from src/system/SocketError.hxx rename to src/net/SocketError.hxx diff --git a/src/system/SocketUtil.cxx b/src/net/SocketUtil.cxx similarity index 98% rename from src/system/SocketUtil.cxx rename to src/net/SocketUtil.cxx index 26fc94bd4..556a8d037 100644 --- a/src/system/SocketUtil.cxx +++ b/src/net/SocketUtil.cxx @@ -20,7 +20,7 @@ #include "config.h" #include "SocketUtil.hxx" #include "SocketError.hxx" -#include "fd_util.h" +#include "system/fd_util.h" #include diff --git a/src/system/SocketUtil.hxx b/src/net/SocketUtil.hxx similarity index 100% rename from src/system/SocketUtil.hxx rename to src/net/SocketUtil.hxx diff --git a/src/output/plugins/httpd/HttpdClient.cxx b/src/output/plugins/httpd/HttpdClient.cxx index b372eedbc..99210c1fd 100644 --- a/src/output/plugins/httpd/HttpdClient.cxx +++ b/src/output/plugins/httpd/HttpdClient.cxx @@ -23,7 +23,7 @@ #include "util/ASCII.hxx" #include "Page.hxx" #include "IcyMetaDataServer.hxx" -#include "system/SocketError.hxx" +#include "net/SocketError.hxx" #include "Log.hxx" #include diff --git a/src/output/plugins/httpd/HttpdOutputPlugin.cxx b/src/output/plugins/httpd/HttpdOutputPlugin.cxx index a99f9b412..05e3d53d0 100644 --- a/src/output/plugins/httpd/HttpdOutputPlugin.cxx +++ b/src/output/plugins/httpd/HttpdOutputPlugin.cxx @@ -25,7 +25,7 @@ #include "encoder/EncoderInterface.hxx" #include "encoder/EncoderPlugin.hxx" #include "encoder/EncoderList.hxx" -#include "system/Resolver.hxx" +#include "net/Resolver.hxx" #include "Page.hxx" #include "IcyMetaDataServer.hxx" #include "system/fd_util.h" diff --git a/test/run_resolver.cxx b/test/run_resolver.cxx index 284f50d7b..bb40783eb 100644 --- a/test/run_resolver.cxx +++ b/test/run_resolver.cxx @@ -18,7 +18,7 @@ */ #include "config.h" -#include "system/Resolver.hxx" +#include "net/Resolver.hxx" #include "util/Error.hxx" #include "Log.hxx"