From 12b4a4f7b48b21267eb286fd84757513a25123ff Mon Sep 17 00:00:00 2001 From: superp00t Date: Sun, 16 Mar 2025 01:54:01 -0400 Subject: [PATCH] fix(file): aggressively turn off macros that mess with Win32 filestack --- bc/system/file/Stacked.hpp | 4 ++++ bc/system/file/System_File.cpp | 6 ++---- bc/system/file/System_File.hpp | 4 ++++ bc/system/file/win/Stacked.cpp | 2 +- bc/system/file/win/Support.hpp | 3 +++ 5 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 bc/system/file/win/Support.hpp diff --git a/bc/system/file/Stacked.hpp b/bc/system/file/Stacked.hpp index ab3a940..1a6724d 100644 --- a/bc/system/file/Stacked.hpp +++ b/bc/system/file/Stacked.hpp @@ -7,6 +7,10 @@ #include +#if defined(WHOA_SYSTEM_WIN) +#include "bc/system/file/win/Support.hpp" +#endif + namespace System_File { namespace Stacked { diff --git a/bc/system/file/System_File.cpp b/bc/system/file/System_File.cpp index cebf87d..99d424c 100644 --- a/bc/system/file/System_File.cpp +++ b/bc/system/file/System_File.cpp @@ -1,8 +1,8 @@ +#include "bc/system/file/Stacked.hpp" #include "bc/system/file/System_File.hpp" #include "bc/Lock.hpp" #include "bc/File.hpp" #include "bc/String.hpp" -#include "bc/system/file/Stacked.hpp" #include "bc/system/file/Types.hpp" #if defined(WHOA_SYSTEM_WIN) @@ -10,9 +10,7 @@ #include #include -#undef CreateDirectory -#undef RemoveDirectory -#undef GetFreeSpace +#include "bc/system/file/win/Support.hpp" #endif #if defined(WHOA_SYSTEM_MAC) || defined(WHOA_SYSTEM_LINUX) diff --git a/bc/system/file/System_File.hpp b/bc/system/file/System_File.hpp index cbc2c34..dbad16b 100644 --- a/bc/system/file/System_File.hpp +++ b/bc/system/file/System_File.hpp @@ -6,6 +6,10 @@ #include "bc/file/Filesystem.hpp" #include +#if defined(WHOA_SYSTEM_WIN) +#include "bc/system/file/win/Support.hpp" +#endif + namespace System_File { extern bool s_EnableFileLocks; diff --git a/bc/system/file/win/Stacked.cpp b/bc/system/file/win/Stacked.cpp index f2cf551..18dba71 100644 --- a/bc/system/file/win/Stacked.cpp +++ b/bc/system/file/win/Stacked.cpp @@ -1,5 +1,6 @@ #if defined(WHOA_SYSTEM_WIN) +#include "bc/system/file/Stacked.hpp" #include "bc/string/QuickFormat.hpp" #include "bc/File.hpp" #include "bc/Debug.hpp" @@ -7,7 +8,6 @@ #include "bc/String.hpp" #include "bc/Unicode.hpp" #include "bc/File.hpp" -#include "bc/system/file/Stacked.hpp" #include "bc/time/Time.hpp" #include diff --git a/bc/system/file/win/Support.hpp b/bc/system/file/win/Support.hpp new file mode 100644 index 0000000..66af2d7 --- /dev/null +++ b/bc/system/file/win/Support.hpp @@ -0,0 +1,3 @@ +#undef GetFreeSpace +#undef CreateDirectory +#undef RemoveDirectory \ No newline at end of file