diff --git a/src/Makefile.am b/src/Makefile.am index 1843070d..3bc56a80 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -123,6 +123,8 @@ libsub_root_a_SOURCES = \ rpc/xmlrpc.cc \ rpc/xmlrpc_c.cc \ rpc/xmlrpc_tinyxml2.cc \ + rpc/tinyxml2/tinyxml2.h \ + rpc/tinyxml2/tinyxml2.cpp \ \ ui/download.cc \ ui/download.h \ @@ -190,10 +192,7 @@ libsub_root_a_SOURCES = \ thread_base.cc \ thread_base.h \ thread_worker.cc \ - thread_worker.h \ - \ - vendor/tinyxml2/tinyxml2.h \ - vendor/tinyxml2/tinyxml2.cpp + thread_worker.h AM_CPPFLAGS = -I$(srcdir) -I$(top_srcdir) diff --git a/src/vendor/tinyxml2/tinyxml2.cpp b/src/rpc/tinyxml2/tinyxml2.cpp similarity index 96% rename from src/vendor/tinyxml2/tinyxml2.cpp rename to src/rpc/tinyxml2/tinyxml2.cpp index f1023071..568919ab 100644 --- a/src/vendor/tinyxml2/tinyxml2.cpp +++ b/src/rpc/tinyxml2/tinyxml2.cpp @@ -133,6 +133,8 @@ static const unsigned char TIXML_UTF_LEAD_0 = 0xefU; static const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; static const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; +namespace rpc // rtorrent-specific namespace +{ namespace tinyxml2 { @@ -3028,4 +3030,5 @@ bool XMLPrinter::Visit( const XMLUnknown& unknown ) } } // namespace tinyxml2 +} // namespace rpc #endif diff --git a/src/vendor/tinyxml2/tinyxml2.h b/src/rpc/tinyxml2/tinyxml2.h similarity index 96% rename from src/vendor/tinyxml2/tinyxml2.h rename to src/rpc/tinyxml2/tinyxml2.h index 66617de0..6e433c42 100644 --- a/src/vendor/tinyxml2/tinyxml2.h +++ b/src/rpc/tinyxml2/tinyxml2.h @@ -113,6 +113,8 @@ static const int TIXML2_PATCH_VERSION = 0; // so there needs to be a limit in place. static const int TINYXML2_MAX_ELEMENT_DEPTH = 500; +namespace rpc // rtorrent-specific namespace +{ namespace tinyxml2 { class XMLDocument; @@ -2377,6 +2379,7 @@ private: } // namespace tinyxml2 +} // namespace rpc #if defined(_MSC_VER) # pragma warning(pop) diff --git a/src/rpc/xmlrpc_tinyxml2.cc b/src/rpc/xmlrpc_tinyxml2.cc index fe5db560..4a93752a 100644 --- a/src/rpc/xmlrpc_tinyxml2.cc +++ b/src/rpc/xmlrpc_tinyxml2.cc @@ -50,7 +50,7 @@ #include #include -#include "vendor/tinyxml2/tinyxml2.h" +#include "rpc/tinyxml2/tinyxml2.h" #include "utils/base64.h" #include "xmlrpc.h" #include "parse_commands.h"