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()`.

Backport-PR-URL: #22731
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>

PR-URL: #22731
  • Loading branch information
bnoordhuis authored and BethGriggs committed Oct 16, 2018
1 parent 48f31bd commit ca8d4e3
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 ca8d4e3

Please sign in to comment.