Fix include in otherTools.h

This commit is contained in:
Matthieu Gautier 2019-08-08 14:26:21 +02:00
parent e013d38cc6
commit cbe8e20118
4 changed files with 19 additions and 9 deletions

View File

@ -20,18 +20,16 @@
#ifndef KIWIX_OTHERTOOLS_H
#define KIWIX_OTHERTOOLS_H
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
#include <string>
#include <pugixml.hpp>
namespace pugi {
class xml_node;
}
namespace kiwix
{
void sleep(unsigned int milliseconds);
std::string nodeToString(pugi::xml_node node);
std::string nodeToString(const pugi::xml_node& node);
std::string converta2toa3(const std::string& a2code);
}

View File

@ -15,9 +15,11 @@
# define ARIA2_CMD "aria2c.exe"
#else
# define ARIA2_CMD "aria2c"
# include <unistd.h>
#endif
namespace kiwix {
Aria2::Aria2():

View File

@ -17,8 +17,17 @@
* MA 02110-1301, USA.
*/
#include <tools/otherTools.h>
#include "tools/otherTools.h"
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
#include <map>
#include <pugixml.hpp>
static std::map<std::string, std::string> codeisomapping {
{ "aa", "aar" },
@ -185,7 +194,7 @@ struct XmlStringWriter: pugi::xml_writer
}
};
std::string kiwix::nodeToString(pugi::xml_node node)
std::string kiwix::nodeToString(const pugi::xml_node& node)
{
XmlStringWriter writer;
node.print(writer, " ");

View File

@ -4,6 +4,7 @@
#define KIWIX_XMLRPC_H_
#include <tools/otherTools.h>
#include <pugixml.hpp>
namespace kiwix {