mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-05-06 17:51:36 +02:00
Removed config.h.
This commit is contained in:
parent
50c0f2115e
commit
e3767c70c8
@ -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"
|
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "ConfigLoader.h"
|
#include "ConfigLoader.h"
|
||||||
#include "HttpAppFrameworkImpl.h"
|
#include "HttpAppFrameworkImpl.h"
|
||||||
#include <drogon/config.h>
|
|
||||||
#include <trantor/utils/Logger.h>
|
#include <trantor/utils/Logger.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <drogon/HttpResponse.h>
|
#include <drogon/HttpResponse.h>
|
||||||
#include <drogon/HttpTypes.h>
|
#include <drogon/HttpTypes.h>
|
||||||
#include <drogon/Session.h>
|
#include <drogon/Session.h>
|
||||||
#include <drogon/config.h>
|
|
||||||
#include <drogon/utils/Utilities.h>
|
#include <drogon/utils/Utilities.h>
|
||||||
#include <drogon/version.h>
|
#include <drogon/version.h>
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "impl_forwards.h"
|
#include "impl_forwards.h"
|
||||||
#include <drogon/HttpAppFramework.h>
|
#include <drogon/HttpAppFramework.h>
|
||||||
#include <drogon/config.h>
|
|
||||||
#include <json/json.h>
|
#include <json/json.h>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@ -405,7 +405,7 @@ public:
|
|||||||
const std::function<void(const HttpResponsePtr &)> &callback);
|
const std::function<void(const HttpResponsePtr &)> &callback);
|
||||||
|
|
||||||
bool supportSSL() const override {
|
bool supportSSL() const override {
|
||||||
#ifdef OpenSSL_FOUND
|
#ifdef OPENSSL_FOUND
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "HttpRequestImpl.h"
|
#include "HttpRequestImpl.h"
|
||||||
#include "HttpResponseImpl.h"
|
#include "HttpResponseImpl.h"
|
||||||
#include "HttpResponseParser.h"
|
#include "HttpResponseParser.h"
|
||||||
#include <drogon/config.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ void HttpClientImpl::createTcpClient() {
|
|||||||
tcpClientPtr_ =
|
tcpClientPtr_ =
|
||||||
std::make_shared<trantor::TcpClient>(loop_, serverAddr_, "httpClient");
|
std::make_shared<trantor::TcpClient>(loop_, serverAddr_, "httpClient");
|
||||||
|
|
||||||
#ifdef OpenSSL_FOUND
|
#ifdef OPENSSL_FOUND
|
||||||
if (useSSL_) {
|
if (useSSL_) {
|
||||||
LOG_TRACE << "useOldTLS=" << useOldTLS_;
|
LOG_TRACE << "useOldTLS=" << useOldTLS_;
|
||||||
LOG_TRACE << "domain=" << domain_;
|
LOG_TRACE << "domain=" << domain_;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "ListenerManager.h"
|
#include "ListenerManager.h"
|
||||||
#include "HttpAppFrameworkImpl.h"
|
#include "HttpAppFrameworkImpl.h"
|
||||||
#include "HttpServer.h"
|
#include "HttpServer.h"
|
||||||
#include <drogon/config.h>
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -56,7 +56,7 @@ void ListenerManager::addListener(
|
|||||||
const std::string &keyFile,
|
const std::string &keyFile,
|
||||||
bool useOldTLS,
|
bool useOldTLS,
|
||||||
const std::vector<std::pair<std::string, std::string> > &sslConfCmds) {
|
const std::vector<std::pair<std::string, std::string> > &sslConfCmds) {
|
||||||
#ifndef OpenSSL_FOUND
|
#ifndef OPENSSL_FOUND
|
||||||
if (useSSL) {
|
if (useSSL) {
|
||||||
LOG_ERROR << "Can't use SSL without OpenSSL found in your system";
|
LOG_ERROR << "Can't use SSL without OpenSSL found in your system";
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ std::vector<trantor::EventLoop *> ListenerManager::createListeners(
|
|||||||
const WebSocketNewAsyncCallback &webSocketCallback,
|
const WebSocketNewAsyncCallback &webSocketCallback,
|
||||||
const ConnectionCallback &connectionCallback,
|
const ConnectionCallback &connectionCallback,
|
||||||
size_t connectionTimeout,
|
size_t connectionTimeout,
|
||||||
#ifdef OpenSSL_FOUND
|
#ifdef OPENSSL_FOUND
|
||||||
const std::string &globalCertFile,
|
const std::string &globalCertFile,
|
||||||
const std::string &globalKeyFile,
|
const std::string &globalKeyFile,
|
||||||
const std::vector<std::pair<std::string, std::string> > &sslConfCmds,
|
const std::vector<std::pair<std::string, std::string> > &sslConfCmds,
|
||||||
@ -126,7 +126,7 @@ std::vector<trantor::EventLoop *> ListenerManager::createListeners(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (listener.useSSL_) {
|
if (listener.useSSL_) {
|
||||||
#ifdef OpenSSL_FOUND
|
#ifdef OPENSSL_FOUND
|
||||||
auto cert = listener.certFile_;
|
auto cert = listener.certFile_;
|
||||||
auto key = listener.keyFile_;
|
auto key = listener.keyFile_;
|
||||||
if (cert == "")
|
if (cert == "")
|
||||||
@ -172,7 +172,7 @@ std::vector<trantor::EventLoop *> ListenerManager::createListeners(
|
|||||||
syncAdvices,
|
syncAdvices,
|
||||||
preSendingAdvices);
|
preSendingAdvices);
|
||||||
if (listener.useSSL_) {
|
if (listener.useSSL_) {
|
||||||
#ifdef OpenSSL_FOUND
|
#ifdef OPENSSL_FOUND
|
||||||
auto cert = listener.certFile_;
|
auto cert = listener.certFile_;
|
||||||
auto key = listener.keyFile_;
|
auto key = listener.keyFile_;
|
||||||
if (cert.empty())
|
if (cert.empty())
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "HttpRequestImpl.h"
|
#include "HttpRequestImpl.h"
|
||||||
#include "HttpUtils.h"
|
#include "HttpUtils.h"
|
||||||
#include <drogon/MultiPart.h>
|
#include <drogon/MultiPart.h>
|
||||||
#include <drogon/config.h>
|
|
||||||
#include <drogon/utils/Utilities.h>
|
#include <drogon/utils/Utilities.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "SharedLibManager.h"
|
#include "SharedLibManager.h"
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <drogon/config.h>
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <trantor/utils/Logger.h>
|
#include <trantor/utils/Logger.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -20,6 +20,23 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
//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 {
|
namespace drogon {
|
||||||
class SharedLibManager : public trantor::NonCopyable {
|
class SharedLibManager : public trantor::NonCopyable {
|
||||||
public:
|
public:
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <drogon/config.h>
|
|
||||||
#include <drogon/utils/Utilities.h>
|
#include <drogon/utils/Utilities.h>
|
||||||
#include <trantor/utils/Logger.h>
|
#include <trantor/utils/Logger.h>
|
||||||
#ifdef OpenSSL_FOUND
|
#ifdef OPENSSL_FOUND
|
||||||
#include <openssl/md5.h>
|
#include <openssl/md5.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#else
|
#else
|
||||||
@ -1023,7 +1023,7 @@ std::string brotliDecompress(const char * /*data*/, const size_t /*ndata*/) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string getMd5(const char *data, const size_t dataLen) {
|
std::string getMd5(const char *data, const size_t dataLen) {
|
||||||
#ifdef OpenSSL_FOUND
|
#ifdef OPENSSL_FOUND
|
||||||
MD5_CTX c;
|
MD5_CTX c;
|
||||||
unsigned char md5[16] = { 0 };
|
unsigned char md5[16] = { 0 };
|
||||||
MD5_Init(&c);
|
MD5_Init(&c);
|
||||||
@ -1074,7 +1074,7 @@ static bool systemRandomBytes(void *ptr, size_t size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool secureRandomBytes(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)
|
if (RAND_bytes((unsigned char *)ptr, size) == 0)
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
#include "HttpResponseParser.h"
|
#include "HttpResponseParser.h"
|
||||||
#include "HttpUtils.h"
|
#include "HttpUtils.h"
|
||||||
#include "WebSocketConnectionImpl.h"
|
#include "WebSocketConnectionImpl.h"
|
||||||
#include <drogon/config.h>
|
|
||||||
#include <drogon/utils/Utilities.h>
|
#include <drogon/utils/Utilities.h>
|
||||||
#include <trantor/net/InetAddress.h>
|
#include <trantor/net/InetAddress.h>
|
||||||
#ifdef OpenSSL_FOUND
|
#ifdef OPENSSL_FOUND
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
#else
|
#else
|
||||||
#include "ssl_funcs/Sha1.h"
|
#include "ssl_funcs/Sha1.h"
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
#include "HttpResponseImpl.h"
|
#include "HttpResponseImpl.h"
|
||||||
#include "WebSocketConnectionImpl.h"
|
#include "WebSocketConnectionImpl.h"
|
||||||
#include <drogon/HttpFilter.h>
|
#include <drogon/HttpFilter.h>
|
||||||
#include <drogon/config.h>
|
|
||||||
#ifdef OpenSSL_FOUND
|
#ifdef OPENSSL_FOUND
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
#else
|
#else
|
||||||
#include "ssl_funcs/Sha1.h"
|
#include "ssl_funcs/Sha1.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user