aboutsummaryrefslogtreecommitdiff
path: root/zenhttp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-10-16 10:53:54 +0200
committerMartin Ridgers <[email protected]>2021-10-16 10:53:54 +0200
commit8030078d08379d011781c8c09d6840fc24aaec23 (patch)
tree15c5f9b4032140211f34713a034e36ce4b697f78 /zenhttp
parentMerged main (diff)
parentFixed up some more windows include issues (diff)
downloadzen-8030078d08379d011781c8c09d6840fc24aaec23.tar.xz
zen-8030078d08379d011781c8c09d6840fc24aaec23.zip
Merged main
Diffstat (limited to 'zenhttp')
-rw-r--r--zenhttp/httpserver.cpp10
-rw-r--r--zenhttp/include/zenhttp/httpclient.h9
-rw-r--r--zenhttp/include/zenhttp/httpserver.h3
-rw-r--r--zenhttp/include/zenhttp/zenhttp.h8
4 files changed, 16 insertions, 14 deletions
diff --git a/zenhttp/httpserver.cpp b/zenhttp/httpserver.cpp
index 150054c30..f40836c4a 100644
--- a/zenhttp/httpserver.cpp
+++ b/zenhttp/httpserver.cpp
@@ -577,12 +577,12 @@ CreateHttpServer(std::string_view ServerClass)
{
using namespace std::literals;
-#if 1
- HttpServerClass Class = HttpServerClass::kHttpAsio;
-#elif ZEN_WITH_HTTPSYS
- HttpServerClass Class = HttpServerClass::kHttpSys;
-#else
HttpServerClass Class = HttpServerClass::kHttpNull;
+
+#if ZEN_WITH_HTTPSYS
+ Class = HttpServerClass::kHttpSys;
+#elif 1
+ Class = HttpServerClass::kHttpAsio;
#endif
if (ServerClass == "asio"sv)
diff --git a/zenhttp/include/zenhttp/httpclient.h b/zenhttp/include/zenhttp/httpclient.h
index aa36a8027..9ece86111 100644
--- a/zenhttp/include/zenhttp/httpclient.h
+++ b/zenhttp/include/zenhttp/httpclient.h
@@ -10,14 +10,9 @@
#include <zencore/windows.h>
-// For some reason, these don't seem to stick, so we disable the warnings
-//# define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING 1
-//# define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS 1
-#pragma warning(push)
-#pragma warning(disable : 4004)
-#pragma warning(disable : 4996)
+ZEN_THIRD_PARTY_INCLUDES_START
#include <cpr/cpr.h>
-#pragma warning(pop)
+ZEN_THIRD_PARTY_INCLUDES_END
namespace zen {
diff --git a/zenhttp/include/zenhttp/httpserver.h b/zenhttp/include/zenhttp/httpserver.h
index 55bd08a8e..93ba452c7 100644
--- a/zenhttp/include/zenhttp/httpserver.h
+++ b/zenhttp/include/zenhttp/httpserver.h
@@ -4,14 +4,13 @@
#include "zenhttp.h"
-#include <zenhttp/httpcommon.h>
-
#include <zencore/enumflags.h>
#include <zencore/iobuffer.h>
#include <zencore/iohash.h>
#include <zencore/refcount.h>
#include <zencore/string.h>
#include <zencore/uid.h>
+#include <zenhttp/httpcommon.h>
#include <functional>
#include <gsl/gsl-lite.hpp>
diff --git a/zenhttp/include/zenhttp/zenhttp.h b/zenhttp/include/zenhttp/zenhttp.h
index 165f34b48..59c64b31f 100644
--- a/zenhttp/include/zenhttp/zenhttp.h
+++ b/zenhttp/include/zenhttp/zenhttp.h
@@ -4,6 +4,14 @@
#include <zencore/zencore.h>
+#ifndef ZEN_WITH_HTTPSYS
+# if ZEN_PLATFORM_WINDOWS
+# define ZEN_WITH_HTTPSYS 1
+# else
+# define ZEN_WITH_HTTPSYS 0
+# endif
+#endif
+
#define ZENHTTP_API // Placeholder to allow DLL configs in the future
namespace zen {