aboutsummaryrefslogtreecommitdiffstats
path: root/include/openssl/rand.h
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2016-06-26 13:40:15 +0200
committerAndy Polyakov <appro@openssl.org>2016-07-08 11:49:44 +0200
commitf1f5ee17b64397eecfde39960ca11e94064297bd (patch)
tree811a0a155a461065aecca798e7b7e090de7b80d9 /include/openssl/rand.h
parentab6a591caa561017f881ed36028177f9582a74c6 (diff)
downloadopenssl-f1f5ee17b64397eecfde39960ca11e94064297bd.tar.gz
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 'include/openssl/rand.h')
-rw-r--r--include/openssl/rand.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/openssl/rand.h b/include/openssl/rand.h
index d0f8eabe0a..8dab1a00fb 100644
--- a/include/openssl/rand.h
+++ b/include/openssl/rand.h
@@ -14,10 +14,6 @@
# include <openssl/ossl_typ.h>
# include <openssl/e_os2.h>
-# if defined(OPENSSL_SYS_WINDOWS)
-# include <windows.h>
-# endif
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -65,7 +61,8 @@ int RAND_egd_bytes(const char *path, int bytes);
# endif
int RAND_poll(void);
-#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
+#if defined(_WIN32) && (defined(BASETYPES) || defined(_WINDEF_H))
+/* application has to include <windows.h> in order to use these */
DEPRECATEDIN_1_1_0(void RAND_screen(void))
DEPRECATEDIN_1_1_0(int RAND_event(UINT, WPARAM, LPARAM))
#endif