From b7d24c998e79a7521934838133c7feb81ffa7523 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 16 Apr 2021 21:57:34 -0500 Subject: [PATCH] [ox/fs] Cleanup PassThroughFS detection logic --- .../ox/src/ox/fs/filesystem/passthroughfs.hpp | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp index 37524889..48e50382 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp @@ -8,22 +8,20 @@ #pragma once -#if __has_include() +#if __has_include() && defined(OX_USE_STDLIB) #include #include -#define OX_HAS_PASSTHROUGHFS - -#endif - -#ifdef OX_HAS_PASSTHROUGHFS - #include #include "filesystem.hpp" +#define OX_HAS_PASSTHROUGHFS + namespace ox { +constexpr auto HasPassThroughFS = true; + /** * */ @@ -102,4 +100,12 @@ Error PassThroughFS::ls(const char *dir, F cb) noexcept { } +#else + +namespace ox { + +constexpr auto HasPassThroughFS = false; + +} + #endif