diff options
author | Andy Polyakov <appro@openssl.org> | 2016-06-26 13:40:15 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2016-07-08 11:49:44 +0200 |
commit | f1f5ee17b64397eecfde39960ca11e94064297bd (patch) | |
tree | 811a0a155a461065aecca798e7b7e090de7b80d9 /crypto | |
parent | ab6a591caa561017f881ed36028177f9582a74c6 (diff) |
include/openssl: don't include <windows.h> in public headers.
If application uses any of Windows-specific interfaces, make it
application developer's respondibility to include <windows.h>.
Rationale is that <windows.h> is quite "toxic" and is sensitive
to inclusion order (most notably in relation to <winsock2.h>).
It's only natural to give complete control to the application developer.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/async/arch/async_null.c | 4 | ||||
-rw-r--r-- | crypto/async/async_locl.h | 4 | ||||
-rw-r--r-- | crypto/threads_win.c | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/crypto/async/arch/async_null.c b/crypto/async/arch/async_null.c index a9ae35de45..3eaf170f2e 100644 --- a/crypto/async/arch/async_null.c +++ b/crypto/async/arch/async_null.c @@ -11,9 +11,6 @@ #include "../async_locl.h" #ifdef ASYNC_NULL -# include <openssl/ct.h> -# include <openssl/x509v3.h> - int ASYNC_is_capable(void) { return 0; @@ -22,6 +19,5 @@ int ASYNC_is_capable(void) void async_local_cleanup(void) { } - #endif diff --git a/crypto/async/async_locl.h b/crypto/async/async_locl.h index 786cf0099c..f0ac05a3db 100644 --- a/crypto/async/async_locl.h +++ b/crypto/async/async_locl.h @@ -16,6 +16,10 @@ # pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif +#if defined(_WIN32) +# include <windows.h> +#endif + #include <internal/async.h> #include <openssl/crypto.h> diff --git a/crypto/threads_win.c b/crypto/threads_win.c index 545b9beb87..4e0de908ee 100644 --- a/crypto/threads_win.c +++ b/crypto/threads_win.c @@ -7,6 +7,10 @@ * https://www.openssl.org/source/license.html */ +#if defined(_WIN32) +# include <windows.h> +#endif + #include <openssl/crypto.h> #if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG) && defined(OPENSSL_SYS_WINDOWS) |