From 186c83900e7604c1802dced49c53f6af7e78e7b9 Mon Sep 17 00:00:00 2001 From: Wojciech Mamrak Date: Mon, 15 Dec 2025 17:09:19 +0100 Subject: [PATCH] MSVC: Add include guards to config.w32.h to prevent macro redefinition warnings This PR adds standard include guards to win32/build/config.w32.h.in (which generates config.w32.h). This prevents multiple inclusions in the same translation unit, avoiding C4005 warnings for macros redefined by config.pickle.h, arisen due to subsequent inclusion of config.w32.h. --- win32/build/config.w32.h.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index e72e4d6d3ebcd..05da5d0a615f9 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -2,6 +2,9 @@ Build Configuration Template for Win32. */ +#ifndef PHP_WIN32_CONFIG_W32_H +#define PHP_WIN32_CONFIG_W32_H + /* Define the minimum supported version */ #undef _WIN32_WINNT #undef NTDDI_VERSION @@ -141,3 +144,5 @@ #endif #define HAVE_GETADDRINFO 1 + +#endif /* PHP_WIN32_CONFIG_W32_H */