summaryrefslogtreecommitdiffstats
path: root/xmrstak
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-29 21:43:43 +0200
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-09-30 23:46:08 +0200
commit8babae3156430f5aa6b804f7c352ffb178097963 (patch)
tree6c09c50e518c1d6342c06b3890f71043fc0e90b5 /xmrstak
parent4526840bb6347eaed7d80a807357f969f9c68a40 (diff)
downloadxmr-stak-8babae3156430f5aa6b804f7c352ffb178097963.zip
xmr-stak-8babae3156430f5aa6b804f7c352ffb178097963.tar.gz
cleanup includes
Diffstat (limited to 'xmrstak')
-rw-r--r--xmrstak/backend/amd/amd_gpu/gpu.cpp4
-rw-r--r--xmrstak/backend/amd/amd_gpu/gpu.hpp3
-rw-r--r--xmrstak/backend/amd/autoAdjust.hpp11
-rw-r--r--xmrstak/backend/amd/jconf.cpp16
-rw-r--r--xmrstak/backend/amd/jconf.hpp4
-rw-r--r--xmrstak/backend/amd/minethd.cpp31
-rw-r--r--xmrstak/backend/amd/minethd.hpp11
-rw-r--r--xmrstak/backend/backendConnector.cpp37
-rw-r--r--xmrstak/backend/backendConnector.hpp7
-rw-r--r--xmrstak/backend/cpu/autoAdjust.hpp12
-rw-r--r--xmrstak/backend/cpu/autoAdjustHwloc.hpp12
-rw-r--r--xmrstak/backend/cpu/hwlocMemory.hpp2
-rw-r--r--xmrstak/backend/cpu/jconf.cpp12
-rw-r--r--xmrstak/backend/cpu/jconf.hpp4
-rw-r--r--xmrstak/backend/cpu/minethd.cpp26
-rw-r--r--xmrstak/backend/cpu/minethd.hpp12
-rw-r--r--xmrstak/backend/globalStates.cpp6
-rw-r--r--xmrstak/backend/globalStates.hpp7
-rw-r--r--xmrstak/backend/miner_work.hpp1
-rw-r--r--xmrstak/backend/nvidia/autoAdjust.hpp10
-rw-r--r--xmrstak/backend/nvidia/jconf.cpp8
-rw-r--r--xmrstak/backend/nvidia/jconf.hpp2
-rw-r--r--xmrstak/backend/nvidia/minethd.cpp23
-rw-r--r--xmrstak/backend/nvidia/minethd.hpp18
-rw-r--r--xmrstak/backend/nvidia/nvcc_code/cuda_core.cu4
-rw-r--r--xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu4
-rw-r--r--xmrstak/backend/plugin.hpp22
-rw-r--r--xmrstak/cli/cli-miner.cpp24
-rw-r--r--xmrstak/http/httpd.cpp16
-rw-r--r--xmrstak/http/httpd.hpp2
-rw-r--r--xmrstak/jconf.cpp13
-rw-r--r--xmrstak/jconf.hpp7
-rw-r--r--xmrstak/misc/console.cpp3
-rw-r--r--xmrstak/misc/console.hpp5
-rw-r--r--xmrstak/misc/executor.cpp25
-rw-r--r--xmrstak/misc/executor.hpp12
-rw-r--r--xmrstak/misc/jext.hpp3
-rw-r--r--xmrstak/misc/telemetry.cpp4
-rw-r--r--xmrstak/misc/telemetry.hpp1
-rw-r--r--xmrstak/net/jpsock.cpp18
-rw-r--r--xmrstak/net/jpsock.hpp4
-rw-r--r--xmrstak/net/msgstruct.hpp1
-rw-r--r--xmrstak/net/socket.cpp10
-rw-r--r--xmrstak/net/socket.hpp4
-rw-r--r--xmrstak/net/socks.hpp2
-rw-r--r--xmrstak/params.hpp4
46 files changed, 251 insertions, 216 deletions
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp
index 04e442a..deb0fc7 100644
--- a/xmrstak/backend/amd/amd_gpu/gpu.cpp
+++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp
@@ -23,7 +23,6 @@
#ifdef _WIN32
#include <windows.h>
-const char* sSourcePath = "opencl\\cryptonight.cl";
static inline void port_sleep(size_t sec)
{
@@ -31,7 +30,6 @@ static inline void port_sleep(size_t sec)
}
#else
#include <unistd.h>
-const char* sSourcePath = "opencl/cryptonight.cl";
static inline void port_sleep(size_t sec)
{
@@ -46,7 +44,7 @@ static inline long long unsigned int int_port(size_t i)
}
#endif
-#include "gpu.h"
+#include "gpu.hpp"
const char* err_to_str(cl_int ret)
{
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.hpp b/xmrstak/backend/amd/amd_gpu/gpu.hpp
index 8a71cfa..5ff7ea1 100644
--- a/xmrstak/backend/amd/amd_gpu/gpu.hpp
+++ b/xmrstak/backend/amd/amd_gpu/gpu.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include "xmrstak/misc/console.hpp"
+
#if defined(__APPLE__)
#include <OpenCL/cl.h>
#else
@@ -8,7 +10,6 @@
#include <stdint.h>
#include <vector>
-#include "../../../console.h"
#define ERR_SUCCESS (0)
#define ERR_OCL_API (2)
diff --git a/xmrstak/backend/amd/autoAdjust.hpp b/xmrstak/backend/amd/autoAdjust.hpp
index 442d8f1..84541ae 100644
--- a/xmrstak/backend/amd/autoAdjust.hpp
+++ b/xmrstak/backend/amd/autoAdjust.hpp
@@ -1,14 +1,13 @@
#pragma once
+#include "amd_gpu/gpu.hpp"
#include "autoAdjust.hpp"
+#include "jconf.hpp"
-
-#include "jconf.h"
-#include "../../console.h"
-#include "../../ConfigEditor.hpp"
-#include "amd_gpu/gpu.h"
-#include "../../Params.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/misc/configEditor.hpp"
+#include "xmrstak/params.hpp"
#include <vector>
#include <cstdio>
diff --git a/xmrstak/backend/amd/jconf.cpp b/xmrstak/backend/amd/jconf.cpp
index f8a551e..2132ebf 100644
--- a/xmrstak/backend/amd/jconf.cpp
+++ b/xmrstak/backend/amd/jconf.cpp
@@ -22,11 +22,9 @@
*/
-#include "jconf.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "jconf.hpp"
+#include "xmrstak/misc/jext.hpp"
+#include "xmrstak/misc/console.hpp"
#ifdef _WIN32
#define strcasecmp _stricmp
@@ -35,10 +33,10 @@
#include <cpuid.h>
#endif
-#include "../../rapidjson/document.h"
-#include "../../rapidjson/error/en.h"
-#include "../../jext.h"
-#include "../../console.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
namespace xmrstak
{
diff --git a/xmrstak/backend/amd/jconf.hpp b/xmrstak/backend/amd/jconf.hpp
index 9fef331..db41dff 100644
--- a/xmrstak/backend/amd/jconf.hpp
+++ b/xmrstak/backend/amd/jconf.hpp
@@ -1,7 +1,9 @@
#pragma once
+
+#include "xmrstak/params.hpp"
+
#include <stdlib.h>
#include <string>
-#include "../../Params.hpp"
namespace xmrstak
{
diff --git a/xmrstak/backend/amd/minethd.cpp b/xmrstak/backend/amd/minethd.cpp
index f2f5ff4..b2f5620 100644
--- a/xmrstak/backend/amd/minethd.cpp
+++ b/xmrstak/backend/amd/minethd.cpp
@@ -21,28 +21,25 @@
*
*/
+#include "minethd.hpp"
+#include "autoAdjust.hpp"
+#include "amd_gpu/gpu.hpp"
+
+#include "xmrstak/backend/cpu/crypto/cryptonight_aesni.h"
+#include "xmrstak/backend/cpu/crypto/cryptonight.h"
+#include "xmrstak/misc/configEditor.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/backend/cpu/minethd.hpp"
+#include "xmrstak/jconf.hpp"
+#include "xmrstak/misc/executor.hpp"
+#include "xmrstak/misc/environment.hpp"
+#include "xmrstak/params.hpp"
+
#include <assert.h>
#include <cmath>
#include <chrono>
#include <thread>
-
-#include "../../ConfigEditor.hpp"
-#include "autoAdjust.hpp"
-
#include <vector>
-#include "../../console.h"
-#include "../../crypto/cryptonight_aesni.h"
-#include "../cpu/minethd.h"
-#include "../../jconf.h"
-
-#include "../../executor.h"
-#include "minethd.h"
-#include "../../jconf.h"
-#include "../../crypto/cryptonight.h"
-#include "../../Environment.hpp"
-#include "../../Params.hpp"
-#include "amd_gpu/gpu.h"
-
namespace xmrstak
{
diff --git a/xmrstak/backend/amd/minethd.hpp b/xmrstak/backend/amd/minethd.hpp
index 4fb3b13..7e71082 100644
--- a/xmrstak/backend/amd/minethd.hpp
+++ b/xmrstak/backend/amd/minethd.hpp
@@ -1,11 +1,12 @@
#pragma once
+
+#include "amd_gpu/gpu.hpp"
+#include "jconf.hpp"
+#include "xmrstak/backend/iBackend.hpp"
+#include "xmrstak/misc/environment.hpp"
+
#include <thread>
#include <atomic>
-#include "./jconf.h"
-#include "../IBackend.hpp"
-#include "../../Environment.hpp"
-
-#include "amd_gpu/gpu.h"
namespace xmrstak
{
diff --git a/xmrstak/backend/backendConnector.cpp b/xmrstak/backend/backendConnector.cpp
index 1013f79..d07b54d 100644
--- a/xmrstak/backend/backendConnector.cpp
+++ b/xmrstak/backend/backendConnector.cpp
@@ -21,6 +21,24 @@
*
*/
+#include "iBackend.hpp"
+#include "backendConnector.hpp"
+#include "miner_work.hpp"
+#include "globalStates.hpp"
+#include "plugin.hpp"
+#include "xmrstak/misc/environment.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/params.hpp"
+
+#include "cpu/minethd.hpp"
+#ifndef CONF_NO_CUDA
+# include "nvidia/minethd.hpp"
+#endif
+#ifndef CONF_NO_OPENCL
+# include "amd/minethd.hpp"
+#endif
+
+#include <cstdlib>
#include <assert.h>
#include <cmath>
#include <chrono>
@@ -28,29 +46,10 @@
#include <thread>
#include <bitset>
-#include "IBackend.hpp"
-#include "BackendConnector.hpp"
-
-#include "cpu/minethd.h"
-#ifndef CONF_NO_CUDA
-# include "nvidia/minethd.h"
-#endif
-#ifndef CONF_NO_OPENCL
-# include "amd/minethd.h"
-#endif
-#include "miner_work.h"
-#include "GlobalStates.hpp"
- #include <cstdlib>
-
-#include "Plugin.hpp"
-#include "../Environment.hpp"
-#include "../console.h"
-#include "../Params.hpp"
namespace xmrstak
{
-
bool BackendConnector::self_test()
{
diff --git a/xmrstak/backend/backendConnector.hpp b/xmrstak/backend/backendConnector.hpp
index 024d9b1..f573abc 100644
--- a/xmrstak/backend/backendConnector.hpp
+++ b/xmrstak/backend/backendConnector.hpp
@@ -1,10 +1,13 @@
#pragma once
+
+#include "iBackend.hpp"
+#include "miner_work.hpp"
+
#include <thread>
#include <vector>
#include <atomic>
#include <mutex>
-#include "IBackend.hpp"
-#include "miner_work.h"
+
namespace xmrstak
{
diff --git a/xmrstak/backend/cpu/autoAdjust.hpp b/xmrstak/backend/cpu/autoAdjust.hpp
index 32c8576..f686224 100644
--- a/xmrstak/backend/cpu/autoAdjust.hpp
+++ b/xmrstak/backend/cpu/autoAdjust.hpp
@@ -1,9 +1,11 @@
#pragma once
-#include "jconf.h"
-#include "../../console.h"
-#include "../../jconf.h"
-#include "../../ConfigEditor.hpp"
-#include "../../Params.hpp"
+
+#include "jconf.hpp"
+
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/jconf.hpp"
+#include "xmrstak/misc/configEditor.hpp"
+#include "xmrstak/params.hpp"
#include <string>
#ifdef _WIN32
diff --git a/xmrstak/backend/cpu/autoAdjustHwloc.hpp b/xmrstak/backend/cpu/autoAdjustHwloc.hpp
index e1916e0..055a7f5 100644
--- a/xmrstak/backend/cpu/autoAdjustHwloc.hpp
+++ b/xmrstak/backend/cpu/autoAdjustHwloc.hpp
@@ -1,9 +1,8 @@
#pragma once
-#include "../../console.h"
-#include <hwloc.h>
-#include <stdio.h>
-#include "../../Params.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/misc/configEditor.hpp"
+#include "xmrstak/params.hpp"
#ifdef _WIN32
#include <windows.h>
@@ -12,7 +11,10 @@
#endif // _WIN32
#include <string>
-#include "../../ConfigEditor.hpp"
+
+#include <hwloc.h>
+#include <stdio.h>
+
namespace xmrstak
{
diff --git a/xmrstak/backend/cpu/hwlocMemory.hpp b/xmrstak/backend/cpu/hwlocMemory.hpp
index f471951..719c1bb 100644
--- a/xmrstak/backend/cpu/hwlocMemory.hpp
+++ b/xmrstak/backend/cpu/hwlocMemory.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "console.h"
+#include "xmrstak/misc/console.hpp"
#ifndef CONF_NO_HWLOC
diff --git a/xmrstak/backend/cpu/jconf.cpp b/xmrstak/backend/cpu/jconf.cpp
index 021d607..2ded8c0 100644
--- a/xmrstak/backend/cpu/jconf.cpp
+++ b/xmrstak/backend/cpu/jconf.cpp
@@ -21,13 +21,14 @@
*
*/
-#include "jconf.h"
-#include "../../console.h"
-#include <iostream>
+#include "jconf.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/misc/jext.hpp"
+#include <iostream>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
+#include <string>
#ifdef _WIN32
#define strcasecmp _stricmp
@@ -36,9 +37,6 @@
#include <cpuid.h>
#endif
-#include "../../rapidjson/document.h"
-#include "../../rapidjson/error/en.h"
-#include "../../jext.h"
namespace xmrstak
{
diff --git a/xmrstak/backend/cpu/jconf.hpp b/xmrstak/backend/cpu/jconf.hpp
index 1f92765..03dfcc1 100644
--- a/xmrstak/backend/cpu/jconf.hpp
+++ b/xmrstak/backend/cpu/jconf.hpp
@@ -1,7 +1,9 @@
#pragma once
+
+#include "xmrstak/params.hpp"
+
#include <stdlib.h>
#include <string>
-#include "../../Params.hpp"
namespace xmrstak
{
diff --git a/xmrstak/backend/cpu/minethd.cpp b/xmrstak/backend/cpu/minethd.cpp
index 3ffdf99..6037161 100644
--- a/xmrstak/backend/cpu/minethd.cpp
+++ b/xmrstak/backend/cpu/minethd.cpp
@@ -27,19 +27,19 @@
#include <cstring>
#include <thread>
#include <bitset>
-#include "../../console.h"
-#include "../IBackend.hpp"
-#include "../GlobalStates.hpp"
-#include "../../ConfigEditor.hpp"
-#include "../../Params.hpp"
-#include "../../jconf.h"
-
-#include "../../executor.h"
-#include "minethd.h"
-#include "./jconf.h"
-#include "../../crypto/cryptonight_aesni.h"
-#include "../../hwlocMemory.hpp"
-#include "../miner_work.h"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/backend/iBackend.hpp"
+#include "xmrstak/backend//globalStates.hpp"
+#include "xmrstak/misc/configEditor.hpp"
+#include "xmrstak/params.hpp"
+#include "xmrstak/jconf.hpp"
+
+#include "xmrstak/misc/executor.hpp"
+#include "minethd.hpp"
+#include "xmrstak/jconf.hpp"
+#include "xmrstak/backend/crypto/cryptonight_aesni.h"
+#include "hwlocMemory.hpp"
+#include "xmrstak/backend/miner_work.hpp"
#ifndef CONF_NO_HWLOC
# include "autoAdjustHwloc.hpp"
diff --git a/xmrstak/backend/cpu/minethd.hpp b/xmrstak/backend/cpu/minethd.hpp
index 40383cf..1dcca86 100644
--- a/xmrstak/backend/cpu/minethd.hpp
+++ b/xmrstak/backend/cpu/minethd.hpp
@@ -1,13 +1,15 @@
#pragma once
+
+#include "crypto/cryptonight.h"
+#include "xmrstak/backend/miner_work.hpp"
+#include "xmrstak/backend/iBackend.hpp"
+#include "xmrstak/backend/globalStates.hpp"
+
+#include <iostream>
#include <thread>
#include <vector>
#include <atomic>
#include <mutex>
-#include "../../crypto/cryptonight.h"
-#include "../miner_work.h"
-#include "../IBackend.hpp"
-#include "../GlobalStates.hpp"
-#include <iostream>
namespace xmrstak
{
diff --git a/xmrstak/backend/globalStates.cpp b/xmrstak/backend/globalStates.cpp
index 5251da8..ef582c1 100644
--- a/xmrstak/backend/globalStates.cpp
+++ b/xmrstak/backend/globalStates.cpp
@@ -21,15 +21,15 @@
*
*/
+#include "miner_work.hpp"
+#include "globalStates.hpp"
+
#include <assert.h>
#include <cmath>
#include <chrono>
#include <cstring>
-#include "miner_work.h"
-#include "GlobalStates.hpp"
-
namespace xmrstak
{
diff --git a/xmrstak/backend/globalStates.hpp b/xmrstak/backend/globalStates.hpp
index a9818ba..58248bd 100644
--- a/xmrstak/backend/globalStates.hpp
+++ b/xmrstak/backend/globalStates.hpp
@@ -1,7 +1,10 @@
#pragma once
+
+#include "miner_work.hpp"
+#include "xmrstak/misc/environment.hpp"
+
#include <atomic>
-#include "miner_work.h"
-#include "../Environment.hpp"
+
namespace xmrstak
{
diff --git a/xmrstak/backend/miner_work.hpp b/xmrstak/backend/miner_work.hpp
index 8349fda..c471546 100644
--- a/xmrstak/backend/miner_work.hpp
+++ b/xmrstak/backend/miner_work.hpp
@@ -1,4 +1,5 @@
#pragma once
+
#include <thread>
#include <atomic>
#include <mutex>
diff --git a/xmrstak/backend/nvidia/autoAdjust.hpp b/xmrstak/backend/nvidia/autoAdjust.hpp
index 84c6dfc..4107510 100644
--- a/xmrstak/backend/nvidia/autoAdjust.hpp
+++ b/xmrstak/backend/nvidia/autoAdjust.hpp
@@ -3,11 +3,11 @@
#include "autoAdjust.hpp"
-#include "nvcc_code/cryptonight.h"
-#include "jconf.h"
-#include "../../console.h"
-#include "../../ConfigEditor.hpp"
-#include "../../Params.hpp"
+#include "nvcc_code/cryptonight.hpp"
+#include "jconf.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/misc/configEditor.hpp"
+#include "xmrstak/params.hpp"
#include <vector>
#include <cstdio>
diff --git a/xmrstak/backend/nvidia/jconf.cpp b/xmrstak/backend/nvidia/jconf.cpp
index 2184acd..7a94d19 100644
--- a/xmrstak/backend/nvidia/jconf.cpp
+++ b/xmrstak/backend/nvidia/jconf.cpp
@@ -21,7 +21,9 @@
*
*/
-#include "jconf.h"
+#include "jconf.hpp"
+#include "xmrstak/miscjext.hpp"
+#include "xmrstak/misc/console.hpp"
#include <stdio.h>
#include <stdlib.h>
@@ -34,10 +36,6 @@
#include <cpuid.h>
#endif
-#include "../../rapidjson/document.h"
-#include "../../rapidjson/error/en.h"
-#include "../../jext.h"
-#include "../../console.h"
namespace xmrstak
{
diff --git a/xmrstak/backend/nvidia/jconf.hpp b/xmrstak/backend/nvidia/jconf.hpp
index 8959088..2093408 100644
--- a/xmrstak/backend/nvidia/jconf.hpp
+++ b/xmrstak/backend/nvidia/jconf.hpp
@@ -1,7 +1,7 @@
#pragma once
#include <stdlib.h>
#include <string>
-#include "../../Params.hpp"
+#include "xmrstak/params.hpp"
namespace xmrstak
{
diff --git a/xmrstak/backend/nvidia/minethd.cpp b/xmrstak/backend/nvidia/minethd.cpp
index cbee219..7718d34 100644
--- a/xmrstak/backend/nvidia/minethd.cpp
+++ b/xmrstak/backend/nvidia/minethd.cpp
@@ -21,24 +21,23 @@
*
*/
+#include "minethd.hpp"
+#include "autoAdjust.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/backend/cpu/crypto/cryptonight_aesni.h"
+#include "xmrstak/backend/cpu/crypto/cryptonight.h"
+#include "xmrstak/backend/cpu//cpu/minethd.hpp"
+#include "xmrstak/params.hpp"
+#include "xmrstak/misc/executor.hpp"
+#include "xmrstak/jconf.hpp"
+#include "xmrstak/misc/environment.hpp"
+
#include <assert.h>
#include <cmath>
#include <chrono>
#include <thread>
#include <bitset>
#include <vector>
-#include "../../console.h"
-#include "../../crypto/cryptonight_aesni.h"
-#include "../cpu/minethd.h"
-#include "../../Params.hpp"
-
-#include "../../executor.h"
-#include "minethd.h"
-#include "../../jconf.h"
-#include "../../crypto/cryptonight.h"
-#include "../../Environment.hpp"
-#include "autoAdjust.hpp"
-
#ifndef USE_PRECOMPILED_HEADERS
#ifdef WIN32
diff --git a/xmrstak/backend/nvidia/minethd.hpp b/xmrstak/backend/nvidia/minethd.hpp
index 9f3993e..ecf189a 100644
--- a/xmrstak/backend/nvidia/minethd.hpp
+++ b/xmrstak/backend/nvidia/minethd.hpp
@@ -1,14 +1,18 @@
#pragma once
+
+#include "xmrstak/jconf.hpp"
+#include "jconf.hpp"
+#include "nvcc_code/cryptonight.h"
+
+#include "xmrstak/bakcend/cpu/crypto/cryptonight.h"
+#include "xmrstak/backend/iBackend.hpp"
+#include "xmrstak/misc/environment.hpp"
+
+#include <iostream>
#include <thread>
#include <atomic>
#include <vector>
-#include "nvcc_code/cryptonight.h"
-#include "../../crypto/cryptonight.h"
-#include "../../jconf.h"
-#include "./jconf.h"
-#include "../IBackend.hpp"
-#include "../../Environment.hpp"
-#include <iostream>
+
namespace xmrstak
{
diff --git a/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu b/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu
index 7590cf5..0c086e8 100644
--- a/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu
+++ b/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu
@@ -49,8 +49,8 @@ extern "C" void compat_usleep(uint64_t waitTime)
}
#endif
-#include "cryptonight.h"
-#include "cuda_extra.h"
+#include "cryptonight.hpp"
+#include "cuda_extra.hpp"
#include "cuda_aes.hpp"
#include "cuda_device.hpp"
diff --git a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu
index 7052bc8..7734473 100644
--- a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu
+++ b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu
@@ -25,8 +25,8 @@ uint64_t keccakf_rndc[24] ={
typedef unsigned char BitSequence;
typedef unsigned long long DataLength;
-#include "cryptonight.h"
-#include "cuda_extra.h"
+#include "cryptonight.hpp"
+#include "cuda_extra.hpp"
#include "cuda_keccak.hpp"
#include "cuda_blake.hpp"
#include "cuda_groestl.hpp"
diff --git a/xmrstak/backend/plugin.hpp b/xmrstak/backend/plugin.hpp
index 9ba9716..38f8e53 100644
--- a/xmrstak/backend/plugin.hpp
+++ b/xmrstak/backend/plugin.hpp
@@ -1,21 +1,23 @@
#pragma once
+
+#include "xmrstak/misc/environment.hpp"
+
#include <thread>
#include <atomic>
#include <vector>
#include <string>
-#include "IBackend.hpp"
+#include "iBackend.hpp"
#include <iostream>
-#include "../Environment.hpp"
#ifndef USE_PRECOMPILED_HEADERS
-#ifdef WIN32
-#include <direct.h>
-#include <windows.h>
-#else
-#include <sys/types.h>
-#include <dlfcn.h>
-#endif
-#include <iostream>
+# ifdef WIN32
+# include <direct.h>
+# include <windows.h>
+# else
+# include <sys/types.h>
+# include <dlfcn.h>
+# endif
+# include <iostream>
#endif
namespace xmrstak
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp
index f2c5c1d..2941792 100644
--- a/xmrstak/cli/cli-miner.cpp
+++ b/xmrstak/cli/cli-miner.cpp
@@ -21,27 +21,25 @@
*
*/
-#include "../executor.h"
-#include "../backend/miner_work.h"
-#include "../backend/GlobalStates.hpp"
-#include "../backend/BackendConnector.hpp"
-#include "../jconf.h"
-#include "../console.h"
-#include "../donate-level.h"
-#include "../Params.hpp"
-#include "../ConfigEditor.hpp"
-
-#include "../version.h"
+#include "xmrstak/misc/executor.hpp"
+#include "xmrstak/backend/miner_work.hpp"
+#include "xmrstak/backend/globalStates.hpp"
+#include "xmrstak/backend/backendConnector.hpp"
+#include "xmrstak/jconf.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/donate-level.hpp"
+#include "xmrstak/params.hpp"
+#include "xmrstak/misc/configEditor.hpp"
+#include "xmrstak/version.hpp"
#ifndef CONF_NO_HTTPD
-# include "../httpd.h"
+# include "xmrstak/http//httpd.hpp"
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string>
#include <iostream>
-
#include <time.h>
#ifndef CONF_NO_TLS
diff --git a/xmrstak/http/httpd.cpp b/xmrstak/http/httpd.cpp
index 53b73f1..a112bbb 100644
--- a/xmrstak/http/httpd.cpp
+++ b/xmrstak/http/httpd.cpp
@@ -23,19 +23,19 @@
#ifndef CONF_NO_HTTPD
+
+#include "httpd.hpp"
+#include "webdesign.hpp"
+#include "xmrstak/net/msgstruct.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/misc/executor.hpp"
+#include "xmrstak/jconf.hpp"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string>
-#include "msgstruct.h"
-#include "httpd.h"
-#include "console.h"
-#include "executor.h"
-#include "jconf.h"
-
-#include "webdesign.h"
-
#include <microhttpd.h>
#ifdef _WIN32
#define strcasecmp _stricmp
diff --git a/xmrstak/http/httpd.hpp b/xmrstak/http/httpd.hpp
index bc8bcf6..3836968 100644
--- a/xmrstak/http/httpd.hpp
+++ b/xmrstak/http/httpd.hpp
@@ -1,5 +1,7 @@
#pragma once
+#include <stdlib.h>
+
struct MHD_Daemon;
struct MHD_Connection;
diff --git a/xmrstak/jconf.cpp b/xmrstak/jconf.cpp
index bfa2626..cb90feb 100644
--- a/xmrstak/jconf.cpp
+++ b/xmrstak/jconf.cpp
@@ -21,8 +21,12 @@
*
*/
-#include "jconf.h"
-#include "console.h"
+#include "jconf.hpp"
+#include "params.hpp"
+
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/misc/jext.hpp"
+#include "xmrstak/misc/console.hpp"
#include <stdio.h>
#include <stdlib.h>
@@ -35,11 +39,6 @@
#include <cpuid.h>
#endif
-#include "rapidjson/document.h"
-#include "rapidjson/error/en.h"
-#include "jext.h"
-#include "console.h"
-#include "Params.hpp"
using namespace rapidjson;
diff --git a/xmrstak/jconf.hpp b/xmrstak/jconf.hpp
index 934d6f8..41c7712 100644
--- a/xmrstak/jconf.hpp
+++ b/xmrstak/jconf.hpp
@@ -1,8 +1,11 @@
#pragma once
+
+#include "xmrstak/misc/environment.hpp"
+#include "params.hpp"
+
#include <stdlib.h>
#include <string>
-#include "Environment.hpp"
-#include "Params.hpp"
+
class jconf
{
diff --git a/xmrstak/misc/console.cpp b/xmrstak/misc/console.cpp
index 0c73b1d..ba34bb3 100644
--- a/xmrstak/misc/console.cpp
+++ b/xmrstak/misc/console.cpp
@@ -21,7 +21,8 @@
*
*/
-#include "console.h"
+#include "xmrstak/misc/console.hpp"
+
#include <time.h>
#include <stdio.h>
#include <string.h>
diff --git a/xmrstak/misc/console.hpp b/xmrstak/misc/console.hpp
index ac2ed3c..c68bba3 100644
--- a/xmrstak/misc/console.hpp
+++ b/xmrstak/misc/console.hpp
@@ -1,6 +1,9 @@
#pragma once
+
+#include "xmrstak/misc/environment.hpp"
+
#include <mutex>
-#include "Environment.hpp"
+
enum out_colours { K_RED, K_GREEN, K_BLUE, K_YELLOW, K_CYAN, K_MAGENTA, K_WHITE, K_NONE };
diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp
index 64f3d40..455412e 100644
--- a/xmrstak/misc/executor.cpp
+++ b/xmrstak/misc/executor.cpp
@@ -21,24 +21,25 @@
*
*/
+#include "executor.hpp"
+#include "xmrstak/net/jpsock.hpp"
+
+#include "telemetry.hpp"
+#include "xmrstak/backend/miner_work.hpp"
+#include "xmrstak/backend/globalStates.hpp"
+#include "xmrstak/backend/backendConnector.hpp"
+
+#include "xmrstak/jconf.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/donate-level.hpp"
+#include "xmrstak/http/webdesign.hpp"
+
#include <thread>
#include <string>
#include <cmath>
#include <algorithm>
#include <assert.h>
#include <time.h>
-#include "executor.h"
-#include "jpsock.h"
-
-#include "telemetry.h"
-#include "backend/miner_work.h"
-#include "backend/GlobalStates.hpp"
-#include "backend/BackendConnector.hpp"
-
-#include "jconf.h"
-#include "console.h"
-#include "donate-level.h"
-#include "webdesign.h"
#ifdef _WIN32
#define strncasecmp _strnicmp
diff --git a/xmrstak/misc/executor.hpp b/xmrstak/misc/executor.hpp
index a3a0828..8be5f56 100644
--- a/xmrstak/misc/executor.hpp
+++ b/xmrstak/misc/executor.hpp
@@ -1,16 +1,18 @@
#pragma once
+
#include "thdq.hpp"
-#include "msgstruct.h"
+#include "telemetry.hpp"
+#include "xmrstak/backend/iBackend.hpp"
+#include "xmrstak/misc/environment.hpp"
+#include "xmrstak/net/msgstruct.hpp"
+
#include <atomic>
#include <array>
#include <list>
#include <future>
-#include "telemetry.h"
-#include "backend/IBackend.hpp"
-#include "Environment.hpp"
-class jpsock;
+class jpsock;
namespace xmrstak
{
diff --git a/xmrstak/misc/jext.hpp b/xmrstak/misc/jext.hpp
index dce73a0..f4a333c 100644
--- a/xmrstak/misc/jext.hpp
+++ b/xmrstak/misc/jext.hpp
@@ -1,5 +1,8 @@
#pragma once
+#include "xmrstak/rapidjson/document.h"
+#include "xmrstak/rapidjson/error/en.h"
+
using namespace rapidjson;
/* This macro brings rapidjson more in line with other libs */
diff --git a/xmrstak/misc/telemetry.cpp b/xmrstak/misc/telemetry.cpp
index fafccd5..c5cce23 100644
--- a/xmrstak/misc/telemetry.cpp
+++ b/xmrstak/misc/telemetry.cpp
@@ -21,10 +21,12 @@
*
*/
+#include "telemetry.hpp"
+
#include <cmath>
#include <cstring>
#include <chrono>
-#include "telemetry.h"
+
namespace xmrstak
{
diff --git a/xmrstak/misc/telemetry.hpp b/xmrstak/misc/telemetry.hpp
index 0538090..b35bbbf 100644
--- a/xmrstak/misc/telemetry.hpp
+++ b/xmrstak/misc/telemetry.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <cstdint>
+#include <cstring>
namespace xmrstak
{
diff --git a/xmrstak/net/jpsock.cpp b/xmrstak/net/jpsock.cpp
index d287375..ae20e52 100644
--- a/xmrstak/net/jpsock.cpp
+++ b/xmrstak/net/jpsock.cpp
@@ -24,15 +24,15 @@
#include <stdarg.h>
#include <assert.h>
-#include "jpsock.h"
-#include "executor.h"
-#include "jconf.h"
-
-#include "rapidjson/document.h"
-#include "jext.h"
-#include "socks.h"
-#include "socket.h"
-#include "version.h"
+#include "jpsock.hpp"
+#include "socks.hpp"
+#include "socket.hpp"
+
+#include "xmrstak/misc/executor.hpp"
+#include "xmrstak/jconf.hpp"
+#include "xmrstak/misc/jext.hpp"
+#include "xmrstak/version.hpp"
+
#define AGENTID_STR XMR_STAK_NAME "/" XMR_STAK_VERSION
diff --git a/xmrstak/net/jpsock.hpp b/xmrstak/net/jpsock.hpp
index 4baaade..c2194ad 100644
--- a/xmrstak/net/jpsock.hpp
+++ b/xmrstak/net/jpsock.hpp
@@ -1,11 +1,13 @@
#pragma once
+
+#include "msgstruct.hpp"
+
#include <mutex>
#include <atomic>
#include <condition_variable>
#include <thread>
#include <string>
-#include "msgstruct.h"
/* Our pool can have two kinds of errors:
- Parsing or connection error
diff --git a/xmrstak/net/msgstruct.hpp b/xmrstak/net/msgstruct.hpp
index f3a39b2..05d15fe 100644
--- a/xmrstak/net/msgstruct.hpp
+++ b/xmrstak/net/msgstruct.hpp
@@ -1,4 +1,5 @@
#pragma once
+
#include <string>
#include <string.h>
#include <assert.h>
diff --git a/xmrstak/net/socket.cpp b/xmrstak/net/socket.cpp
index 52f46b5..b93376e 100644
--- a/xmrstak/net/socket.cpp
+++ b/xmrstak/net/socket.cpp
@@ -21,11 +21,11 @@
*
*/
-#include "socket.h"
-#include "jpsock.h"
-#include "jconf.h"
-#include "console.h"
-#include "executor.h"
+#include "socket.hpp"
+#include "jpsock.hpp"
+#include "xmrstak/jconf.hpp"
+#include "xmrstak/misc/console.hpp"
+#include "xmrstak/misc/executor.hpp"
#ifndef CONF_NO_TLS
#include <openssl/ssl.h>
diff --git a/xmrstak/net/socket.hpp b/xmrstak/net/socket.hpp
index 94bbf03..192a32c 100644
--- a/xmrstak/net/socket.hpp
+++ b/xmrstak/net/socket.hpp
@@ -1,5 +1,7 @@
#pragma once
-#include "socks.h"
+
+#include "socks.hpp"
+
class jpsock;
class base_socket
diff --git a/xmrstak/net/socks.hpp b/xmrstak/net/socks.hpp
index 82bfa2f..1d25d3a 100644
--- a/xmrstak/net/socks.hpp
+++ b/xmrstak/net/socks.hpp
@@ -1,4 +1,5 @@
#pragma once
+
#ifdef _WIN32
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0601 /* Windows 7 */
@@ -7,6 +8,7 @@
#include <ws2tcpip.h>
#include <windows.h>
+
inline void sock_init()
{
static bool bWSAInit = false;
diff --git a/xmrstak/params.hpp b/xmrstak/params.hpp
index 92d0da0..3d6a0ab 100644
--- a/xmrstak/params.hpp
+++ b/xmrstak/params.hpp
@@ -1,6 +1,8 @@
#pragma once
+
+#include "xmrstak/misc/environment.hpp"
+
#include <string>
-#include "Environment.hpp"
namespace xmrstak
{
OpenPOWER on IntegriCloud