diff options
| author | Martin Ridgers <[email protected]> | 2021-11-02 14:59:34 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-11-02 15:29:02 +0100 |
| commit | 247fcac487773ee87125ac9d2d32b7abb16e6096 (patch) | |
| tree | 415a541ba7cd56a7084746187506ae0683574e8f | |
| parent | Merged main (diff) | |
| download | zen-247fcac487773ee87125ac9d2d32b7abb16e6096.tar.xz zen-247fcac487773ee87125ac9d2d32b7abb16e6096.zip | |
Wrapped Windows-specific include in if-def preprocessor blocks
| -rw-r--r-- | zen/cmds/dedup.cpp | 4 | ||||
| -rw-r--r-- | zen/cmds/dedup.h | 2 | ||||
| -rw-r--r-- | zen/internalfile.cpp | 1 | ||||
| -rw-r--r-- | zen/internalfile.h | 9 | ||||
| -rw-r--r-- | zen/zen.h | 8 | ||||
| -rw-r--r-- | zenserver-test/projectclient.cpp | 4 | ||||
| -rw-r--r-- | zenserver-test/zenserver-test.cpp | 8 |
7 files changed, 24 insertions, 12 deletions
diff --git a/zen/cmds/dedup.cpp b/zen/cmds/dedup.cpp index 089212ed9..2f6e5d2cc 100644 --- a/zen/cmds/dedup.cpp +++ b/zen/cmds/dedup.cpp @@ -10,7 +10,9 @@ #include <zencore/thread.h> #include <zencore/timer.h> -#include <ppl.h> +#if ZEN_PLATFORM_WINDOWS +# include <ppl.h> +#endif namespace zen { diff --git a/zen/cmds/dedup.h b/zen/cmds/dedup.h index 7932d10e6..dbda236f6 100644 --- a/zen/cmds/dedup.h +++ b/zen/cmds/dedup.h @@ -4,8 +4,6 @@ #include "../zen.h" -#include <ppl.h> - namespace zen { /** Deduplicate files in a tree using block cloning diff --git a/zen/internalfile.cpp b/zen/internalfile.cpp index 3ad5a7d05..32108f615 100644 --- a/zen/internalfile.cpp +++ b/zen/internalfile.cpp @@ -5,7 +5,6 @@ #include <zencore/filesystem.h> #include <zencore/fmtutils.h> #include <zencore/logging.h> -#include <zencore/windows.h> #include <gsl/gsl-lite.hpp> diff --git a/zen/internalfile.h b/zen/internalfile.h index c6071418e..08083678f 100644 --- a/zen/internalfile.h +++ b/zen/internalfile.h @@ -10,9 +10,14 @@ #include <zencore/iobuffer.h> #include <zencore/refcount.h> #include <zencore/thread.h> -#include <zencore/windows.h> -#include <atlfile.h> +#if ZEN_PLATFORM_WINDOWS +# include <zencore/windows.h> +#endif + +#if ZEN_PLATFORM_WINDOWS +# include <atlfile.h> +#endif #include <filesystem> #include <list> @@ -2,12 +2,16 @@ #pragma once +#include <zencore/refcount.h> +#include <zencore/zencore.h> + ZEN_THIRD_PARTY_INCLUDES_START #include <cxxopts.hpp> ZEN_THIRD_PARTY_INCLUDES_END -#include <zencore/refcount.h> -#include <zencore/windows.h> +#if ZEN_PLATFORM_WINDOWS +# include <zencore/windows.h> +#endif #include <filesystem> diff --git a/zenserver-test/projectclient.cpp b/zenserver-test/projectclient.cpp index 2700ae9da..e6be6df38 100644 --- a/zenserver-test/projectclient.cpp +++ b/zenserver-test/projectclient.cpp @@ -11,7 +11,9 @@ #include <asio.hpp> #include <gsl/gsl-lite.hpp> -#include <atlbase.h> +#if ZEN_PLATFORM_WINDOWS +# include <atlbase.h> +#endif namespace zen { diff --git a/zenserver-test/zenserver-test.cpp b/zenserver-test/zenserver-test.cpp index 0fedd4b8b..7aa1a8fa0 100644 --- a/zenserver-test/zenserver-test.cpp +++ b/zenserver-test/zenserver-test.cpp @@ -40,7 +40,6 @@ ZEN_THIRD_PARTY_INCLUDES_START #undef GetObject ZEN_THIRD_PARTY_INCLUDES_END -#include <ppl.h> #include <atomic> #include <filesystem> #include <map> @@ -48,8 +47,11 @@ ZEN_THIRD_PARTY_INCLUDES_END #include <span> #include <unordered_map> -#include <atlbase.h> -#include <process.h> +#if ZEN_PLATFORM_WINDOWS +# include <ppl.h> +# include <atlbase.h> +# include <process.h> +#endif #include <asio.hpp> |