Skip to content

Commit

Permalink
build: define NOMINMAX on windows
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bnoordhuis authored and addaleax committed Oct 2, 2018
1 parent f5985c7 commit 89d092e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@
'FD_SETSIZE=1024',
# we need to use node's preferred "win32" rather than gyp's preferred "win"
'NODE_PLATFORM="win32"',
# Stop <windows.h> from defining macros that conflict with
# std::min() and std::max(). We don't use <windows.h> (much)
# but we still inherit it from uv.h.
'NOMINMAX',
'_UNICODE=1',
],
'libraries': [ '-lpsapi.lib' ]
Expand Down

0 comments on commit 89d092e

Please sign in to comment.