diff --git a/BUILDING b/BUILDING index 87e23c643..830f58b21 100644 --- a/BUILDING +++ b/BUILDING @@ -14,8 +14,8 @@ Build Prerequisites: * On Windows only, Yasm[4] is required. * A C compiler is required. On Windows, MSVC 12 (Visual Studio 2013) or later - are supported. Recent versions of GCC and Clang should work on non-Windows - platforms, and maybe on Windows too. + with Platform SDK 8.1 or later are supported. Recent versions of GCC and + Clang should work on non-Windows platforms, and maybe on Windows too. * Bash is required for running some tests, but not for building. diff --git a/crypto/bio/bio_test.c b/crypto/bio/bio_test.c index db6fc026e..57684df54 100644 --- a/crypto/bio/bio_test.c +++ b/crypto/bio/bio_test.c @@ -26,6 +26,7 @@ #include #include #else +#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/crypto/bio/connect.c b/crypto/bio/connect.c index 9bd87d4f9..55b9352aa 100644 --- a/crypto/bio/connect.c +++ b/crypto/bio/connect.c @@ -65,6 +65,10 @@ #include #include #include +#else +#define WIN32_LEAN_AND_MEAN +#include +#include #endif #include diff --git a/crypto/bio/fd.c b/crypto/bio/fd.c index bc47e746f..c5133d805 100644 --- a/crypto/bio/fd.c +++ b/crypto/bio/fd.c @@ -61,6 +61,7 @@ #if !defined(OPENSSL_WINDOWS) #include #else +#define WIN32_LEAN_AND_MEAN #include #include #endif diff --git a/crypto/bio/internal.h b/crypto/bio/internal.h index ba28839ac..d9a34f18e 100644 --- a/crypto/bio/internal.h +++ b/crypto/bio/internal.h @@ -67,8 +67,7 @@ typedef unsigned short u_short; #include #include #else -#include -#include +typedef int socklen_t; #endif #if defined(__cplusplus) diff --git a/crypto/bio/socket.c b/crypto/bio/socket.c index 90ae14a6d..6d393a22e 100644 --- a/crypto/bio/socket.c +++ b/crypto/bio/socket.c @@ -61,6 +61,9 @@ #if !defined(OPENSSL_WINDOWS) #include +#else +#define WIN32_LEAN_AND_MEAN +#include #endif #include "internal.h" diff --git a/crypto/bio/socket_helper.c b/crypto/bio/socket_helper.c index ba65a1a43..801800a55 100644 --- a/crypto/bio/socket_helper.c +++ b/crypto/bio/socket_helper.c @@ -24,9 +24,9 @@ #include #include #else +#define WIN32_LEAN_AND_MEAN #include #include -typedef int socklen_t; #endif #include "internal.h" diff --git a/crypto/directory_win.c b/crypto/directory_win.c index 4956383db..203d4a202 100644 --- a/crypto/directory_win.c +++ b/crypto/directory_win.c @@ -30,6 +30,7 @@ #if defined(OPENSSL_WINDOWS) +#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/crypto/err/err.c b/crypto/err/err.c index 892b2ac83..5ee81ca81 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -115,6 +115,7 @@ #include #if defined(OPENSSL_WINDOWS) +#define WIN32_LEAN_AND_MEAN #include #endif diff --git a/crypto/mem.c b/crypto/mem.c index 11ef33524..834141173 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -65,6 +65,7 @@ #include #if defined(OPENSSL_WINDOWS) +#define WIN32_LEAN_AND_MEAN #include #else #include diff --git a/crypto/rand/windows.c b/crypto/rand/windows.c index ed6e5e9ed..86bea8584 100644 --- a/crypto/rand/windows.c +++ b/crypto/rand/windows.c @@ -16,6 +16,7 @@ #if defined(OPENSSL_WINDOWS) +#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/crypto/thread.c b/crypto/thread.c index 15e38bdd2..b1b4d00ef 100644 --- a/crypto/thread.c +++ b/crypto/thread.c @@ -59,6 +59,7 @@ #include #if defined(OPENSSL_WINDOWS) +#define WIN32_LEAN_AND_MEAN #include #endif diff --git a/tool/speed.cc b/tool/speed.cc index cfffcb05b..8184339ef 100644 --- a/tool/speed.cc +++ b/tool/speed.cc @@ -27,6 +27,7 @@ #include #if defined(OPENSSL_WINDOWS) +#define WIN32_LEAN_AND_MEAN #include #elif defined(OPENSSL_APPLE) #include diff --git a/tool/transport_common.cc b/tool/transport_common.cc index c2b3e0c83..00b4a8b52 100644 --- a/tool/transport_common.cc +++ b/tool/transport_common.cc @@ -35,7 +35,6 @@ #include #include #include -typedef int socklen_t; typedef int ssize_t; #define read _read #define write _write