Skip to content

Commit f050521

Browse files
bnoordhuisevanlucas
authored andcommitted
build: define NOMINMAX on windows
Build with `-DNOMINMAX` to stop `<windows.h>` from defining macros that conflict with `std::min()` and `std::max()`. PR-URL: #18216 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent e3cc091 commit f050521

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

node.gyp

+4
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,10 @@
445445
'FD_SETSIZE=1024',
446446
# we need to use node's preferred "win32" rather than gyp's preferred "win"
447447
'NODE_PLATFORM="win32"',
448+
# Stop <windows.h> from defining macros that conflict with
449+
# std::min() and std::max(). We don't use <windows.h> (much)
450+
# but we still inherit it from uv.h.
451+
'NOMINMAX',
448452
'_UNICODE=1',
449453
],
450454
'libraries': [ '-lpsapi.lib' ]

0 commit comments

Comments
 (0)