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:
Brian Smith 2015-01-28 20:34:47 -08:00 committed by Adam Langley
parent 4a0f0c4910
commit a87de9b39b
14 changed files with 1 additions and 13 deletions

View File

@ -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

View File

@ -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>

View File

@ -66,7 +66,6 @@
#include <arpa/inet.h>
#include <unistd.h>
#else
#define WIN32_LEAN_AND_MEAN
#include <WinSock2.h>
#include <WS2tcpip.h>
#endif

View File

@ -61,7 +61,6 @@
#if !defined(OPENSSL_WINDOWS)
#include <unistd.h>
#else
#define WIN32_LEAN_AND_MEAN
#include <io.h>
#include <Windows.h>
#endif

View File

@ -62,7 +62,6 @@
#if !defined(OPENSSL_WINDOWS)
#include <unistd.h>
#else
#define WIN32_LEAN_AND_MEAN
#include <WinSock2.h>
#endif

View File

@ -24,7 +24,6 @@
#include <netdb.h>
#include <unistd.h>
#else
#define WIN32_LEAN_AND_MEAN
#include <WinSock2.h>
#include <WS2tcpip.h>
#endif

View File

@ -30,7 +30,6 @@
#if defined(OPENSSL_WINDOWS)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <errno.h>

View File

@ -115,7 +115,6 @@
#include <stdio.h>
#if defined(OPENSSL_WINDOWS)
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif

View File

@ -65,7 +65,6 @@
#include <string.h>
#if defined(OPENSSL_WINDOWS)
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#else
#include <strings.h>

View File

@ -16,7 +16,6 @@
#if defined(OPENSSL_WINDOWS)
#define WIN32_LEAN_AND_MEAN
#include <limits.h>
#include <stdlib.h>
#include <Windows.h>

View File

@ -59,7 +59,6 @@
#include <errno.h>
#if defined(OPENSSL_WINDOWS)
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif

View File

@ -32,7 +32,6 @@
#endif
#else
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <io.h>
#define PATH_MAX MAX_PATH

View File

@ -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>

View File

@ -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>