diff options
author | Alberto Gonzalez Iniesta <agi@inittab.org> | 2016-12-27 18:25:47 +0100 |
---|---|---|
committer | Alberto Gonzalez Iniesta <agi@inittab.org> | 2016-12-27 18:25:47 +0100 |
commit | 79f3537f69e125f19f59c36aa090120a63186a54 (patch) | |
tree | 2089a3b7dac990841dbc2e4d9b2f535b82dbb0af /src/compat/compat-versionhelpers.h | |
parent | f2137fedb30cb87448eb03b2f288920df6187571 (diff) | |
parent | 3a2bbdb05ca6a6996e424c9fb225cb0d53804125 (diff) |
Merge tag 'upstream/2.4.0'
Upstream version 2.4.0
Diffstat (limited to 'src/compat/compat-versionhelpers.h')
-rw-r--r-- | src/compat/compat-versionhelpers.h | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/src/compat/compat-versionhelpers.h b/src/compat/compat-versionhelpers.h index f634091..a793056 100644 --- a/src/compat/compat-versionhelpers.h +++ b/src/compat/compat-versionhelpers.h @@ -18,64 +18,77 @@ #define _WIN32_WINNT_WINBLUE 0x0603 -VERSIONHELPERAPI IsWindowsVersionOrGreater(WORD major, WORD minor, WORD servpack) +VERSIONHELPERAPI +IsWindowsVersionOrGreater(WORD major, WORD minor, WORD servpack) { OSVERSIONINFOEXW vi = {sizeof(vi),major,minor,0,0,{0},servpack}; return VerifyVersionInfoW(&vi, VER_MAJORVERSION|VER_MINORVERSION|VER_SERVICEPACKMAJOR, - VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, - VER_MAJORVERSION,VER_GREATER_EQUAL), - VER_MINORVERSION,VER_GREATER_EQUAL), - VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL)); + VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0, + VER_MAJORVERSION,VER_GREATER_EQUAL), + VER_MINORVERSION,VER_GREATER_EQUAL), + VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL)); } -VERSIONHELPERAPI IsWindowsXPOrGreater(void) { +VERSIONHELPERAPI +IsWindowsXPOrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 0); } -VERSIONHELPERAPI IsWindowsXPSP1OrGreater(void) { +VERSIONHELPERAPI +IsWindowsXPSP1OrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 1); } -VERSIONHELPERAPI IsWindowsXPSP2OrGreater(void) { +VERSIONHELPERAPI +IsWindowsXPSP2OrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 2); } -VERSIONHELPERAPI IsWindowsXPSP3OrGreater(void) { +VERSIONHELPERAPI +IsWindowsXPSP3OrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 3); } -VERSIONHELPERAPI IsWindowsVistaOrGreater(void) { +VERSIONHELPERAPI +IsWindowsVistaOrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 0); } -VERSIONHELPERAPI IsWindowsVistaSP1OrGreater(void) { +VERSIONHELPERAPI +IsWindowsVistaSP1OrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 1); } -VERSIONHELPERAPI IsWindowsVistaSP2OrGreater(void) { +VERSIONHELPERAPI +IsWindowsVistaSP2OrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 2); } -VERSIONHELPERAPI IsWindows7OrGreater(void) { +VERSIONHELPERAPI +IsWindows7OrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WIN32_WINNT_WIN7), 0); } -VERSIONHELPERAPI IsWindows7SP1OrGreater(void) { +VERSIONHELPERAPI +IsWindows7SP1OrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WIN32_WINNT_WIN7), 1); } -VERSIONHELPERAPI IsWindows8OrGreater(void) { +VERSIONHELPERAPI +IsWindows8OrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN8), LOBYTE(_WIN32_WINNT_WIN8), 0); } -VERSIONHELPERAPI IsWindows8Point1OrGreater(void) { +VERSIONHELPERAPI +IsWindows8Point1OrGreater(void) { return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINBLUE), LOBYTE(_WIN32_WINNT_WINBLUE), 0); } -VERSIONHELPERAPI IsWindowsServer(void) { +VERSIONHELPERAPI +IsWindowsServer(void) { OSVERSIONINFOEXW vi = {sizeof(vi),0,0,0,0,{0},0,0,0,VER_NT_WORKSTATION}; return !VerifyVersionInfoW(&vi, VER_PRODUCT_TYPE, VerSetConditionMask(0, VER_PRODUCT_TYPE, VER_EQUAL)); } -#endif -#endif +#endif /* if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined(__WIDL__) */ +#endif /* ifndef _INC_VERSIONHELPERS */ |