Skip to content

Commit 89d092e

Browse files
bnoordhuisaddaleax
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: nodejs#18216 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent f5985c7 commit 89d092e

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
@@ -446,6 +446,10 @@
446446
'FD_SETSIZE=1024',
447447
# we need to use node's preferred "win32" rather than gyp's preferred "win"
448448
'NODE_PLATFORM="win32"',
449+
# Stop <windows.h> from defining macros that conflict with
450+
# std::min() and std::max(). We don't use <windows.h> (much)
451+
# but we still inherit it from uv.h.
452+
'NOMINMAX',
449453
'_UNICODE=1',
450454
],
451455
'libraries': [ '-lpsapi.lib' ]

0 commit comments

Comments
 (0)