Skip to content

Commit

Permalink
Define NOMINMAX across the entire project.
Browse files Browse the repository at this point in the history
This fixes the standalone build on Windows and matches Chromium.

Change-Id: I194f53e0a610c5ae9cef53c826b22f7bded5f357
Reviewed-on: https://boringssl-review.googlesource.com/4201
Reviewed-by: Adam Langley <agl@google.com>
  • Loading branch information
davidben authored and agl committed Apr 2, 2015
1 parent c0f763b commit 0e434b9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ elseif(MSVC)
set(CMAKE_CXX_FLAGS "-Wall -WX ${MSVC_DISABLED_WARNINGS_STR}")
add_definitions(-D_HAS_EXCEPTIONS=0)
add_definitions(-DWIN32_LEAN_AND_MEAN)
add_definitions(-DNOMINMAX)
endif()

if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.7.99") OR
Expand Down
1 change: 0 additions & 1 deletion tool/digest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#define O_BINARY 0
#endif
#else
#define NOMINMAX
#pragma warning(push, 3)
#include <windows.h>
#pragma warning(pop)
Expand Down
1 change: 0 additions & 1 deletion tool/transport_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <sys/socket.h>
#include <unistd.h>
#else
#define NOMINMAX
#include <io.h>
#pragma warning(push, 3)
#include <winsock2.h>
Expand Down

0 comments on commit 0e434b9

Please sign in to comment.