From 6020ce5fa70212f105e74456037a2f5cc66c4e09 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sat, 4 Jun 2016 20:06:56 +0100 Subject: win32: Introduced centralised verify windows version function --- lib/system_win32.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'lib/system_win32.h') 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)) -- cgit v1.2.3