Skip to content

Commit 4d1fa2c

Browse files
pmedbnoordhuis
authored andcommitted
src: add check for already defined macro NOMINMAX
In order to avoid Visual C++ warning C4005 about macro redefinition when node.h is included in another project. PR-URL: #986 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent ae7a233 commit 4d1fa2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/node.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
# define _WIN32_WINNT 0x0501
2626
#endif
2727

28-
#define NOMINMAX
28+
#ifndef NOMINMAX
29+
# define NOMINMAX
30+
#endif
2931

3032
#endif
3133

0 commit comments

Comments
 (0)