[openssl-commits] [openssl] OpenSSL_0_9_8-stable update
Matt Caswell
matt at openssl.org
Tue Jan 13 09:33:37 UTC 2015
The branch OpenSSL_0_9_8-stable has been updated
via 09caf4ffcd5c45bef9012aa53cc64ef5c8b1067f (commit)
from 9793a0713f08a6ca85852410fa00a774b3b6c2ea (commit)
- Log -----------------------------------------------------------------
commit 09caf4ffcd5c45bef9012aa53cc64ef5c8b1067f
Author: Dr. Stephen Henson <steve at openssl.org>
Date: Tue Feb 25 12:11:22 2014 +0000
Avoid Windows 8 Getversion deprecated errors.
Windows 8 SDKs complain that GetVersion() is deprecated.
We only use GetVersion like this:
(GetVersion() < 0x80000000)
which checks if the Windows version is NT based. Use a macro check_winnt()
which uses GetVersion() on older SDK versions and true otherwise.
(cherry picked from commit a4cc3c8041104896d51ae12ef7b678c31808ce52)
Conflicts:
apps/apps.c
crypto/bio/bss_log.c
Backported by Matt Caswell <matt at openssl.org>
Reviewed-by: Tim Hudson <tjh at openss.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/cryptlib.c | 2 +-
crypto/rand/rand_win.c | 2 +-
e_os.h | 7 +++++++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index dec3286..64d9793 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -512,7 +512,7 @@ void OPENSSL_showfatal (const char *fmta,...)
#if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333
/* this -------------v--- guards NT-specific calls */
- if (GetVersion() < 0x80000000 && OPENSSL_isservice() > 0)
+ if (check_winnt() && OPENSSL_isservice() > 0)
{ HANDLE h = RegisterEventSource(0,_T("OPENSSL"));
const TCHAR *pmsg=buf;
ReportEvent(h,EVENTLOG_ERROR_TYPE,0,0,0,1,0,&pmsg,0);
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index 5d134e1..34ffcd2 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -750,7 +750,7 @@ static void readscreen(void)
int y; /* y-coordinate of screen lines to grab */
int n = 16; /* number of screen lines to grab at a time */
- if (GetVersion() < 0x80000000 && OPENSSL_isservice()>0)
+ if (check_winnt() && OPENSSL_isservice()>0)
return;
/* Create a screen DC and a memory DC compatible to screen DC */
diff --git a/e_os.h b/e_os.h
index ca4044b..c75858b 100644
--- a/e_os.h
+++ b/e_os.h
@@ -360,6 +360,13 @@ static __inline unsigned int _strlen31(const char *str)
# define DEFAULT_HOME "C:"
# endif
+/* Avoid Windows 8 SDK GetVersion deprecated problems */
+#if defined(_MSC_VER) && _MSC_VER>=1800
+# define check_winnt() (1)
+#else
+# define check_winnt() (GetVersion() < 0x80000000)
+#endif
+
#else /* The non-microsoft world */
# ifdef OPENSSL_SYS_VMS
More information about the openssl-commits
mailing list