From 0f9bcf33197989bda47ccde4ad4fc1feb82dffbe 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. (cherry picked from commit a4cc3c8041104896d51ae12ef7b678c31808ce52) --- e_os.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'e_os.h') diff --git a/e_os.h b/e_os.h index 3688c4e0f9..a1e77e7488 100644 --- a/e_os.h +++ b/e_os.h @@ -371,6 +371,13 @@ static 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 -- cgit v1.2.3