From c507d9b10eaa3cd0d3065f4da8e0beb15a21d033 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Tue, 6 Jan 2009 00:02:42 +0000 Subject: Less header dependencies, some compilation fixes for Borland/Intel/MW compilers git-svn-id: http://pugixml.googlecode.com/svn/trunk@103 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixml.cpp | 10 +++++++--- src/pugixml.hpp | 4 +--- src/pugixpath.cpp | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/pugixml.cpp b/src/pugixml.cpp index e0d74aa..5852814 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -15,15 +15,18 @@ #include #include +#include #include +#include #if !defined(PUGIXML_NO_XPATH) && defined(PUGIXML_NO_EXCEPTIONS) #error No exception mode can't be used with XPath support #endif #ifndef PUGIXML_NO_STL -# include +# include +# include #endif #ifdef _MSC_VER @@ -39,6 +42,7 @@ #ifdef __BORLANDC__ // BC workaround using std::memmove; +using std::memcpy; #endif #define STATIC_ASSERT(cond) { static const char condition_failed[(cond) ? 1 : -1] = {0}; (void)condition_failed[0]; } @@ -1412,7 +1416,7 @@ namespace unsigned int ch = (unsigned char)*s++; char buf[8]; - sprintf(buf, "&#%d;", ch); + sprintf(buf, "&#%u;", ch); writer.write(buf); } @@ -1578,7 +1582,7 @@ namespace pugi void xml_writer_stream::write(const void* data, size_t size) { - stream->write(reinterpret_cast(data), size); + stream->write(reinterpret_cast(data), static_cast(size)); } #endif diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 5b317e2..26e2f0f 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -18,8 +18,7 @@ #ifndef PUGIXML_NO_STL # include -# include -# include +# include #endif // No XPath without STL @@ -30,7 +29,6 @@ #endif #include -#include /// The PugiXML Parser namespace. namespace pugi diff --git a/src/pugixpath.cpp b/src/pugixpath.cpp index 89d021a..310cac6 100644 --- a/src/pugixpath.cpp +++ b/src/pugixpath.cpp @@ -17,12 +17,13 @@ #include -#include +#include #include #include #include #include +#include #if defined(_MSC_VER) # pragma warning(disable: 4127) // conditional expression is constant -- cgit v1.2.3