Skip to content

Commit 186c839

Browse files
committed
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.
1 parent 8ffedc8 commit 186c839

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

win32/build/config.w32.h.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Build Configuration Template for Win32.
33
*/
44

5+
#ifndef PHP_WIN32_CONFIG_W32_H
6+
#define PHP_WIN32_CONFIG_W32_H
7+
58
/* Define the minimum supported version */
69
#undef _WIN32_WINNT
710
#undef NTDDI_VERSION
@@ -141,3 +144,5 @@
141144
#endif
142145

143146
#define HAVE_GETADDRINFO 1
147+
148+
#endif /* PHP_WIN32_CONFIG_W32_H */

0 commit comments

Comments
 (0)