Define WIN32_LEAN_AND_MEAN in the build system, not in the code.
This avoids a conflict with the Chromium build system, which defines WIN32_LEAN_AND_MEAN with a different value. BUG=crbug.com/453196 Change-Id: Ia15ec7c20325c1961af4f32e5208266e5f846f35 Reviewed-on: https://boringssl-review.googlesource.com/3150 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
4a0f0c4910
commit
a87de9b39b
@ -10,6 +10,7 @@ elseif(MSVC)
|
||||
set(CMAKE_C_FLAGS "/wd4267")
|
||||
set(CMAKE_CXX_FLAGS "/wd4267")
|
||||
add_definitions(-D_HAS_EXCEPTIONS=0)
|
||||
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||
endif()
|
||||
|
||||
if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.5.99") OR
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <io.h>
|
||||
#include <WinSock2.h>
|
||||
#include <WS2tcpip.h>
|
||||
|
@ -66,7 +66,6 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <WinSock2.h>
|
||||
#include <WS2tcpip.h>
|
||||
#endif
|
||||
|
@ -61,7 +61,6 @@
|
||||
#if !defined(OPENSSL_WINDOWS)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <io.h>
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
@ -62,7 +62,6 @@
|
||||
#if !defined(OPENSSL_WINDOWS)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <WinSock2.h>
|
||||
#endif
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <WinSock2.h>
|
||||
#include <WS2tcpip.h>
|
||||
#endif
|
||||
|
@ -30,7 +30,6 @@
|
||||
|
||||
#if defined(OPENSSL_WINDOWS)
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
#include <errno.h>
|
||||
|
@ -115,7 +115,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(OPENSSL_WINDOWS)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
|
@ -65,7 +65,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#if defined(OPENSSL_WINDOWS)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#if defined(OPENSSL_WINDOWS)
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <Windows.h>
|
||||
|
@ -59,7 +59,6 @@
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(OPENSSL_WINDOWS)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
|
@ -32,7 +32,6 @@
|
||||
#endif
|
||||
#else
|
||||
#define NOMINMAX
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <io.h>
|
||||
#define PATH_MAX MAX_PATH
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
#if defined(OPENSSL_WINDOWS)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
#elif defined(OPENSSL_APPLE)
|
||||
#include <sys/time.h>
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#define WIN32_LEAN_AND_MEAN // prevent conflicting defines of X509_* names
|
||||
#define NOMINMAX
|
||||
#include <io.h>
|
||||
#include <WinSock2.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user