summaryrefslogtreecommitdiffstats
path: root/e_os.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-02-25 12:11:22 +0000
committerDr. Stephen Henson <steve@openssl.org>2014-02-25 13:42:25 +0000
commitcaf55bfacff80c82bbf4737d46771a059f219fa3 (patch)
tree383da32dfc9378497085de4541e5c37dd7279040 /e_os.h
parentce3631015ebd7bbc046b71b2a4c906fabc2cb256 (diff)
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)
Diffstat (limited to 'e_os.h')
-rw-r--r--e_os.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/e_os.h b/e_os.h
index 79c1392573..6a0aad1de7 100644
--- a/e_os.h
+++ b/e_os.h
@@ -368,6 +368,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