diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2014-02-25 12:11:22 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-02-25 13:40:33 +0000 |
commit | a4cc3c8041104896d51ae12ef7b678c31808ce52 (patch) | |
tree | 914087a9cfce93b5227e67f4d2e118956c52f9ab /crypto | |
parent | 19f65ddbab30543415584ae7916e12a3c5249dba (diff) | |
download | openssl-a4cc3c8041104896d51ae12ef7b678c31808ce52.tar.gz |
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.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/bio/bss_log.c | 2 | ||||
-rw-r--r-- | crypto/cryptlib.c | 2 | ||||
-rw-r--r-- | crypto/rand/rand_win.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/crypto/bio/bss_log.c b/crypto/bio/bss_log.c index b7dce5c1a2..2227b2b52d 100644 --- a/crypto/bio/bss_log.c +++ b/crypto/bio/bss_log.c @@ -245,7 +245,7 @@ static int MS_CALLBACK slg_puts(BIO *bp, const char *str) static void xopenlog(BIO* bp, char* name, int level) { - if (GetVersion() < 0x80000000) + if (check_winnt()) bp->ptr = RegisterEventSourceA(NULL,name); else bp->ptr = NULL; diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 049a7bba91..897b5b5bc2 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -357,7 +357,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 07ab4eb8df..73f261f122 100644 --- a/crypto/rand/rand_win.c +++ b/crypto/rand/rand_win.c @@ -752,7 +752,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 */ |