[Bf-blender-cvs] [2e5e7567854] temp-cpp-file-system: Windows: Undefine options for Windows.h after use

Julian Eisel noreply at git.blender.org
Tue Aug 3 18:23:44 CEST 2021


Commit: 2e5e75678544e4b95d57369eb3e8b5ced17cd9ab
Author: Julian Eisel
Date:   Tue Aug 3 18:23:19 2021 +0200
Branches: temp-cpp-file-system
https://developer.blender.org/rB2e5e75678544e4b95d57369eb3e8b5ced17cd9ab

Windows: Undefine options for Windows.h after use

===================================================================

M	source/blender/blenlib/BLI_filesystem.hh

===================================================================

diff --git a/source/blender/blenlib/BLI_filesystem.hh b/source/blender/blenlib/BLI_filesystem.hh
index 5469d97e327..22d74f82b9f 100644
--- a/source/blender/blenlib/BLI_filesystem.hh
+++ b/source/blender/blenlib/BLI_filesystem.hh
@@ -31,21 +31,44 @@
 #ifdef WIN32
 #  ifndef NOGDI
 #    define NOGDI
+#    define NOGDI_CLEANUP
 #  endif
 #  ifndef NOMINMAX
 #    define NOMINMAX
+#    define NOMINMAX_CLEANUP
 #  endif
 #  ifndef WIN32_LEAN_AND_MEAN
 #    define WIN32_LEAN_AND_MEAN
+#    define WIN32_LEAN_AND_MEAN_CLEANUP
 #  endif
 #  ifndef NOCOMM
 #    define NOCOMM
+#    define NOCOMM_CLEANUP
 #  endif
 #endif /* _WIN32 */
 
 /* Header for ghc::filesystem. */
 #include "filesystem.hpp"
 
+#ifdef WIN32
+#  ifdef NOGDI_CLEANUP
+#    undef NOGDI
+#    undef NOGDI_CLEANUP
+#  endif
+#  ifdef NOMINMAX_CLEANUP
+#    undef NOMINMAX
+#    undef NOMINMAX_CLEANUP
+#  endif
+#  ifdef WIN32_LEAN_AND_MEAN_CLEANUP
+#    undef WIN32_LEAN_AND_MEAN
+#    undef WIN32_LEAN_AND_MEAN_CLEANUP
+#  endif
+#  ifdef NOCOMM_CLEANUP
+#    undef NOCOMM
+#    undef NOCOMM_CLEANUP
+#  endif
+#endif
+
 namespace blender::bli {
 namespace filesystem = ghc::filesystem;
 }



More information about the Bf-blender-cvs mailing list