From a73862b954209fd1adce0f07b8f80b8cf27f2486 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Thu, 9 Sep 2021 16:29:24 +0200 Subject: Added compile time logic to toggle http.sys / null http implementation on/off --- zenhttp/httpsys.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'zenhttp/httpsys.h') diff --git a/zenhttp/httpsys.h b/zenhttp/httpsys.h index ed4a6a182..ec8964f13 100644 --- a/zenhttp/httpsys.h +++ b/zenhttp/httpsys.h @@ -2,12 +2,21 @@ #include -#define _WINSOCKAPI_ -#include -#include "iothreadpool.h" +#ifndef ZEN_WITH_HTTPSYS +# if ZEN_PLATFORM_WINDOWS +# define ZEN_WITH_HTTPSYS 1 +#else +# define ZEN_WITH_HTTPSYS 0 +# endif +#endif -#include -#include +#if ZEN_WITH_HTTPSYS +# define _WINSOCKAPI_ +# include +# include "iothreadpool.h" + +# include +# include namespace zen { @@ -59,3 +68,4 @@ private: }; } // namespace zen +#endif -- cgit v1.2.3