diff options
author | Steve Holme <steve_holme@hotmail.com> | 2016-06-04 20:06:56 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2016-06-04 21:24:09 +0100 |
commit | 6020ce5fa70212f105e74456037a2f5cc66c4e09 (patch) | |
tree | 50e6f453909010eaecac246844412198f4bb0c48 /lib/system_win32.h | |
parent | 584d0121c353ed855115c39f6cbc009854018029 (diff) | |
download | curl-6020ce5fa70212f105e74456037a2f5cc66c4e09.tar.gz |
win32: Introduced centralised verify windows version function
Diffstat (limited to 'lib/system_win32.h')
-rw-r--r-- | lib/system_win32.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/system_win32.h b/lib/system_win32.h index dec18899a..1e772856b 100644 --- a/lib/system_win32.h +++ b/lib/system_win32.h @@ -26,6 +26,28 @@ #if defined(WIN32) +/* Version condition */ +typedef enum { + VERSION_LESS_THAN, + VERSION_LESS_THAN_EQUAL, + VERSION_EQUAL, + VERSION_GREATER_THAN_EQUAL, + VERSION_GREATER_THAN +} VersionCondition; + +/* Platform identifier */ +typedef enum { + PLATFORM_DONT_CARE, + PLATFORM_WINDOWS, + PLATFORM_WINNT +} PlatformIdentifier; + +/* This is used to verify if we are running on a specific windows version */ +bool Curl_verify_windows_version(const unsigned int majorVersion, + const unsigned int minorVersion, + const PlatformIdentifier platform, + const VersionCondition condition); + #if defined(USE_WINDOWS_SSPI) || (!defined(CURL_DISABLE_TELNET) && \ defined(USE_WINSOCK)) |