aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-10-15 16:29:38 +0200
committerStefan Boberg <[email protected]>2021-10-15 16:29:38 +0200
commitbb258b7bf62c5021d2ccde38107efcfdfc52ddd0 (patch)
tree6d641ac4ecc04373e19a9c80776a47ba5b590eaf /zenhttp/include
parentzencore: added ZEN_THIRD_PARTY_INCLUDES_START/ZEN_THIRD_PARTY_INCLUDES_END (diff)
downloadzen-bb258b7bf62c5021d2ccde38107efcfdfc52ddd0.tar.xz
zen-bb258b7bf62c5021d2ccde38107efcfdfc52ddd0.zip
zencore: Enabled MSC warning 4668 to get warnings when preprocessor macros are used without an explicit definition
Also fixed up various code to compile with this, by using ZEN_THIRD_PARTY_INCLUDES_START/ZEN_THIRD_PARTY_INCLUDES_END macros Removed prewindows.h/postwindows.h since they are no longer to be used due to the above
Diffstat (limited to 'zenhttp/include')
-rw-r--r--zenhttp/include/zenhttp/httpclient.h9
-rw-r--r--zenhttp/include/zenhttp/zenhttp.h8
2 files changed, 10 insertions, 7 deletions
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/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 {