Header-only build fix for WIN32_LEAN_AND_MEAN redefinition (#764)

When using snmalloc as header-only library in a project that globally defines `WIN32_LEAN_AND_MEAN`, there is a compile error for macro redefinition.

Guard the pal_windows.h define.
This commit is contained in:
Jeff Sooknarine
2025-04-01 17:16:55 -04:00
committed by GitHub
parent 80bdcd999f
commit 59987ca908

View File

@@ -9,7 +9,9 @@
# include <errno.h>
# include <stdio.h>
# endif
# define WIN32_LEAN_AND_MEAN
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# ifndef NOMINMAX
# define NOMINMAX
# endif