diff --git a/modules/drogon/drogon/config/drogon/config.h b/modules/drogon/drogon/config/drogon/config.h deleted file mode 100644 index c132eeb..0000000 --- a/modules/drogon/drogon/config/drogon/config.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#define USE_POSTGRESQL 0 -#define LIBPQ_SUPPORTS_BATCH_MODE 0 -#define USE_MYSQL 0 -#define USE_SQLITE3 0 -#define OpenSSL_FOUND -/* #undef Boost_FOUND */ - -#define COMPILATION_FLAGS "-std=c++17" -#define COMPILER_COMMAND "/usr/bin/c++" -#define COMPILER_ID "GNU" - -#define INCLUDING_DIRS " -I/usr/include -I/usr/local/include" diff --git a/modules/drogon/drogon/lib/src/ConfigLoader.cc b/modules/drogon/drogon/lib/src/ConfigLoader.cc index 8a1d99b..e97e4de 100644 --- a/modules/drogon/drogon/lib/src/ConfigLoader.cc +++ b/modules/drogon/drogon/lib/src/ConfigLoader.cc @@ -14,7 +14,7 @@ #include "ConfigLoader.h" #include "HttpAppFrameworkImpl.h" -#include + #include #include #include diff --git a/modules/drogon/drogon/lib/src/HttpAppFrameworkImpl.cc b/modules/drogon/drogon/lib/src/HttpAppFrameworkImpl.cc index c5e33ec..ee45d80 100644 --- a/modules/drogon/drogon/lib/src/HttpAppFrameworkImpl.cc +++ b/modules/drogon/drogon/lib/src/HttpAppFrameworkImpl.cc @@ -31,7 +31,7 @@ #include #include #include -#include + #include #include #include diff --git a/modules/drogon/drogon/lib/src/HttpAppFrameworkImpl.h b/modules/drogon/drogon/lib/src/HttpAppFrameworkImpl.h index 898749c..79cdce8 100644 --- a/modules/drogon/drogon/lib/src/HttpAppFrameworkImpl.h +++ b/modules/drogon/drogon/lib/src/HttpAppFrameworkImpl.h @@ -16,7 +16,7 @@ #include "impl_forwards.h" #include -#include + #include #include #include @@ -405,7 +405,7 @@ public: const std::function &callback); bool supportSSL() const override { -#ifdef OpenSSL_FOUND +#ifdef OPENSSL_FOUND return true; #endif return false; diff --git a/modules/drogon/drogon/lib/src/HttpClientImpl.cc b/modules/drogon/drogon/lib/src/HttpClientImpl.cc index f0adfa9..8803d6d 100644 --- a/modules/drogon/drogon/lib/src/HttpClientImpl.cc +++ b/modules/drogon/drogon/lib/src/HttpClientImpl.cc @@ -17,7 +17,7 @@ #include "HttpRequestImpl.h" #include "HttpResponseImpl.h" #include "HttpResponseParser.h" -#include + #include #include @@ -32,7 +32,7 @@ void HttpClientImpl::createTcpClient() { tcpClientPtr_ = std::make_shared(loop_, serverAddr_, "httpClient"); -#ifdef OpenSSL_FOUND +#ifdef OPENSSL_FOUND if (useSSL_) { LOG_TRACE << "useOldTLS=" << useOldTLS_; LOG_TRACE << "domain=" << domain_; diff --git a/modules/drogon/drogon/lib/src/ListenerManager.cc b/modules/drogon/drogon/lib/src/ListenerManager.cc index 87649c9..db0dfe3 100644 --- a/modules/drogon/drogon/lib/src/ListenerManager.cc +++ b/modules/drogon/drogon/lib/src/ListenerManager.cc @@ -15,7 +15,7 @@ #include "ListenerManager.h" #include "HttpAppFrameworkImpl.h" #include "HttpServer.h" -#include + #include #include #include @@ -56,7 +56,7 @@ void ListenerManager::addListener( const std::string &keyFile, bool useOldTLS, const std::vector > &sslConfCmds) { -#ifndef OpenSSL_FOUND +#ifndef OPENSSL_FOUND if (useSSL) { LOG_ERROR << "Can't use SSL without OpenSSL found in your system"; } @@ -70,7 +70,7 @@ std::vector ListenerManager::createListeners( const WebSocketNewAsyncCallback &webSocketCallback, const ConnectionCallback &connectionCallback, size_t connectionTimeout, -#ifdef OpenSSL_FOUND +#ifdef OPENSSL_FOUND const std::string &globalCertFile, const std::string &globalKeyFile, const std::vector > &sslConfCmds, @@ -126,7 +126,7 @@ std::vector ListenerManager::createListeners( } if (listener.useSSL_) { -#ifdef OpenSSL_FOUND +#ifdef OPENSSL_FOUND auto cert = listener.certFile_; auto key = listener.keyFile_; if (cert == "") @@ -172,7 +172,7 @@ std::vector ListenerManager::createListeners( syncAdvices, preSendingAdvices); if (listener.useSSL_) { -#ifdef OpenSSL_FOUND +#ifdef OPENSSL_FOUND auto cert = listener.certFile_; auto key = listener.keyFile_; if (cert.empty()) diff --git a/modules/drogon/drogon/lib/src/MultiPart.cc b/modules/drogon/drogon/lib/src/MultiPart.cc index 9cf3f0e..e43366d 100644 --- a/modules/drogon/drogon/lib/src/MultiPart.cc +++ b/modules/drogon/drogon/lib/src/MultiPart.cc @@ -17,7 +17,7 @@ #include "HttpRequestImpl.h" #include "HttpUtils.h" #include -#include + #include #include #include diff --git a/modules/drogon/drogon/lib/src/SharedLibManager.cc b/modules/drogon/drogon/lib/src/SharedLibManager.cc index 6f5d068..bd978f9 100644 --- a/modules/drogon/drogon/lib/src/SharedLibManager.cc +++ b/modules/drogon/drogon/lib/src/SharedLibManager.cc @@ -15,7 +15,7 @@ #include "SharedLibManager.h" #include #include -#include + #include #include #include diff --git a/modules/drogon/drogon/lib/src/SharedLibManager.h b/modules/drogon/drogon/lib/src/SharedLibManager.h index 125041a..14c808d 100644 --- a/modules/drogon/drogon/lib/src/SharedLibManager.h +++ b/modules/drogon/drogon/lib/src/SharedLibManager.h @@ -20,6 +20,23 @@ #include #include +//not sure wheter these are needed or not yet +#ifndef COMPILER_COMMAND +#define COMPILER_COMMAND "/usr/bin/c++" +#endif + +#ifndef COMPILATION_FLAGS +#define COMPILATION_FLAGS "-std=c++17" +#endif + +#ifndef COMPILER_ID +#define COMPILER_ID "GNU" +#endif + +#ifndef INCLUDING_DIRS +#define INCLUDING_DIRS " -I/usr/include -I/usr/local/include" +#endif + namespace drogon { class SharedLibManager : public trantor::NonCopyable { public: diff --git a/modules/drogon/drogon/lib/src/Utilities.cc b/modules/drogon/drogon/lib/src/Utilities.cc index 6887315..b5302b9 100644 --- a/modules/drogon/drogon/lib/src/Utilities.cc +++ b/modules/drogon/drogon/lib/src/Utilities.cc @@ -12,10 +12,10 @@ * */ -#include + #include #include -#ifdef OpenSSL_FOUND +#ifdef OPENSSL_FOUND #include #include #else @@ -1023,7 +1023,7 @@ std::string brotliDecompress(const char * /*data*/, const size_t /*ndata*/) { #endif std::string getMd5(const char *data, const size_t dataLen) { -#ifdef OpenSSL_FOUND +#ifdef OPENSSL_FOUND MD5_CTX c; unsigned char md5[16] = { 0 }; MD5_Init(&c); @@ -1074,7 +1074,7 @@ static bool systemRandomBytes(void *ptr, size_t size) { } bool secureRandomBytes(void *ptr, size_t size) { -#ifdef OpenSSL_FOUND +#ifdef OPENSSL_FOUND if (RAND_bytes((unsigned char *)ptr, size) == 0) return true; #endif diff --git a/modules/drogon/drogon/lib/src/WebSocketClientImpl.cc b/modules/drogon/drogon/lib/src/WebSocketClientImpl.cc index 9d95033..478743a 100644 --- a/modules/drogon/drogon/lib/src/WebSocketClientImpl.cc +++ b/modules/drogon/drogon/lib/src/WebSocketClientImpl.cc @@ -19,10 +19,10 @@ #include "HttpResponseParser.h" #include "HttpUtils.h" #include "WebSocketConnectionImpl.h" -#include + #include #include -#ifdef OpenSSL_FOUND +#ifdef OPENSSL_FOUND #include #else #include "ssl_funcs/Sha1.h" diff --git a/modules/drogon/drogon/lib/src/WebsocketControllersRouter.cc b/modules/drogon/drogon/lib/src/WebsocketControllersRouter.cc index a7d5721..cc509a6 100644 --- a/modules/drogon/drogon/lib/src/WebsocketControllersRouter.cc +++ b/modules/drogon/drogon/lib/src/WebsocketControllersRouter.cc @@ -18,8 +18,8 @@ #include "HttpResponseImpl.h" #include "WebSocketConnectionImpl.h" #include -#include -#ifdef OpenSSL_FOUND + +#ifdef OPENSSL_FOUND #include #else #include "ssl_funcs/Sha1.h"