From a4cc3c8041104896d51ae12ef7b678c31808ce52 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 25 Feb 2014 12:11:22 +0000 Subject: 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. --- crypto/cryptlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/cryptlib.c') 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); -- cgit v1.2.3