summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-01-19 18:18:20 +0100
committerMichael Stahl <mstahl@redhat.com>2015-01-19 20:31:38 +0000
commit4500afcc1be7774b3c35ab69a20e36165ca5445a (patch)
treef010aced19eebb1241fa1c54469a57816e0bf209 /fpicker
parent913f777c08ce3f089d3155ed77338c9be26abc90 (diff)
try to fix GetVersionEx deprecation warnings from Windows SDK 8.1
Apparently GetVersionEx() is deprecated now, but the replacement header "versionhelpers.h" does not exist in older SDKs (at least not in 8.0), so try to determine the used SDK version by checking if the Windows 8.1 version constant _WIN32_WINNT_WINBLUE (0x0602) exists. http://msdn.microsoft.com/en-us/library/windows/desktop/dn424972%28v=vs.85%29.aspx Change-Id: Ia9224a8c76823ada7cb294a600046c6a0fc843ad Reviewed-on: https://gerrit.libreoffice.org/14020 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/win32/misc/WinImplHelper.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx
index 84d76d708a9c..8f470a2dc08c 100644
--- a/fpicker/source/win32/misc/WinImplHelper.cxx
+++ b/fpicker/source/win32/misc/WinImplHelper.cxx
@@ -63,6 +63,10 @@ const sal_Unicode AMPERSAND_SIGN = L'&';
bool SAL_CALL IsWindowsVistaOrNewer()
{
+// the Win32 SDK 8.1 deprecates GetVersionEx()
+#ifdef _WIN32_WINNT_WINBLUE
+ return IsWindowsVistaOrGreater() ? true : false;
+#else
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
@@ -77,6 +81,7 @@ bool SAL_CALL IsWindowsVistaOrNewer()
sal::static_int_cast< unsigned int >(0));
return bRet;
+#endif
}