From 4e746916a7fc044d3e71d30995d58a1b281c304f Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Wed, 12 Jun 2019 14:07:09 +0200 Subject: [PATCH] Remove unnecessary include. And unistd.h is not available on windows. --- include/kiwixserve.h | 8 -------- src/kiwixserve.cpp | 6 +++++- src/tools/pathTools.cpp | 5 ----- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/include/kiwixserve.h b/include/kiwixserve.h index f0eaeeb8c..e696f7d83 100644 --- a/include/kiwixserve.h +++ b/include/kiwixserve.h @@ -1,15 +1,7 @@ #ifndef KIWIXLIB_KIWIX_SERVE_H_ #define KIWIXLIB_KIWIX_SERVE_H_ -#ifdef _WIN32 -// winsock2.h need to be included before windows.h (included by curl.h) -# include -#endif - -#include -#include #include -#include "tools/pathTools.h" class Subprocess; namespace kiwix { diff --git a/src/kiwixserve.cpp b/src/kiwixserve.cpp index 395734b6e..e4425e69f 100644 --- a/src/kiwixserve.cpp +++ b/src/kiwixserve.cpp @@ -3,10 +3,14 @@ #ifdef _WIN32 # define KIWIXSERVE_CMD "kiwix-serve.exe" + # include #else # define KIWIXSERVE_CMD "kiwix-serve" + # include #endif +#include "tools/pathTools.h" + namespace kiwix { KiwixServe::KiwixServe() : m_port(8181) @@ -54,4 +58,4 @@ void KiwixServe::shutDown() mp_kiwixServe->kill(); } -} \ No newline at end of file +} diff --git a/src/tools/pathTools.cpp b/src/tools/pathTools.cpp index 19740ca3c..83db6f90c 100644 --- a/src/tools/pathTools.cpp +++ b/src/tools/pathTools.cpp @@ -29,11 +29,6 @@ #define getcwd _getcwd // stupid MSFT "deprecation" warning #endif -#ifdef _WIN32 -#else -#include -#endif - #ifdef _WIN32 const std::string SEPARATOR("\\"); #else