diff options
| author | Stefan Boberg <[email protected]> | 2021-09-09 16:29:24 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-09 16:29:24 +0200 |
| commit | a73862b954209fd1adce0f07b8f80b8cf27f2486 (patch) | |
| tree | 07f2898998f884e871c47a2979dfb01434443584 /zenhttp/httpsys.h | |
| parent | Factored out http server related code into zenhttp module since it feels out ... (diff) | |
| download | zen-a73862b954209fd1adce0f07b8f80b8cf27f2486.tar.xz zen-a73862b954209fd1adce0f07b8f80b8cf27f2486.zip | |
Added compile time logic to toggle http.sys / null http implementation on/off
Diffstat (limited to 'zenhttp/httpsys.h')
| -rw-r--r-- | zenhttp/httpsys.h | 20 |
1 files changed, 15 insertions, 5 deletions
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 <zenhttp/httpserver.h> -#define _WINSOCKAPI_ -#include <zencore/windows.h> -#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 <atlbase.h> -#include <http.h> +#if ZEN_WITH_HTTPSYS +# define _WINSOCKAPI_ +# include <zencore/windows.h> +# include "iothreadpool.h" + +# include <atlbase.h> +# include <http.h> namespace zen { @@ -59,3 +68,4 @@ private: }; } // namespace zen +#endif |