]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Globally define WIN32_LEAN_AND_MEAN (#882)
authorGregor Jasny <gregor.jasny@logmein.com>
Mon, 5 Jul 2021 18:20:46 +0000 (20:20 +0200)
committerGitHub <noreply@github.com>
Mon, 5 Jul 2021 18:20:46 +0000 (20:20 +0200)
cmake/StandardSettings.cmake
src/system.hpp
src/third_party/win32/mktemp.c

index 8742be0bb8b22aa2009fd77648ccdc40c6fb05e4..4dfc7e1d35ef0d53d96e4b0ebd8e4895ceeeb647 100644 (file)
@@ -59,3 +59,10 @@ elseif(MSVC)
     INTERFACE /Zc:preprocessor /Zc:__cplusplus /D_CRT_SECURE_NO_WARNINGS
   )
 endif()
+
+if(WIN32)
+  target_compile_definitions(
+    standard_settings
+    INTERFACE WIN32_LEAN_AND_MEAN
+  )
+endif()
index be82343081ad4301cdbbcbff52e69eff26aa8e52..191f5e30ad31e235e6f0421a58d29ca3131663ed 100644 (file)
@@ -147,7 +147,11 @@ const mode_t S_IWUSR = mode_t(_S_IWRITE);
 #  include <process.h>
 #  define NOMINMAX 1
 #  define WIN32_NO_STATUS
+// clang-format off
 #  include <windows.h>
+#  include <bcrypt.h> // NTSTATUS
+#  include <winsock2.h> // struct timeval
+// clang-format on
 #  undef WIN32_NO_STATUS
 #  include <ntstatus.h>
 #  define mkdir(a, b) _mkdir(a)
index 8963b89061e7ca3e4212bfbfe30b2acfa098420a..d0bea77652081a29a14fbcc4e03f240133627115 100644 (file)
@@ -45,7 +45,6 @@
 #include <direct.h>
 #include <io.h>
 
-#define WIN32_LEAN_AND_MEAN
 #define NOMINMAX 1
 #define WIN32_NO_STATUS
 #include <windows.h>