]> granicus.if.org Git - curl/commitdiff
win32: Added additional preprocessor check for Version Helper API
authorSteve Holme <steve_holme@hotmail.com>
Fri, 17 Jan 2014 22:36:21 +0000 (22:36 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sat, 18 Jan 2014 11:42:48 +0000 (11:42 +0000)
A follow up patch to commit d2671340a613 as _WIN32_WINNT_WIN2K and
_WIN32_WINNT_WIN2K may not be defined on all systems.

lib/connect.c
lib/curl_sspi.c

index 0f7deb3cbab028ebbe0d0c1910ec8fee9970a636..5a376c34aaebd2eb6ad33e5f5c819eefd50ee489 100644 (file)
@@ -921,7 +921,8 @@ void Curl_sndbufset(curl_socket_t sockfd)
   static int detectOsState = DETECT_OS_NONE;
 
   if(detectOsState == DETECT_OS_NONE) {
-#if (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
+#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_WIN2K) || \
+    (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
     OSVERSIONINFO osver;
 
     memset(&osver, 0, sizeof(osver));
index 1cc18877f994534d16a20838865a251d6c92e0ec..bb41a879c73979de55615a5768dbe677a974f1ff 100644 (file)
@@ -79,7 +79,8 @@ CURLcode Curl_sspi_global_init(void)
     DWORD majorVersion = 4;
     DWORD platformId = VER_PLATFORM_WIN32_NT;
 
-#if (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
+#if !defined(_WIN32_WINNT) || !defined(_WIN32_WINNT_WIN2K) || \
+    (_WIN32_WINNT < _WIN32_WINNT_WIN2K)
     OSVERSIONINFO osver;
 
     memset(&osver, 0, sizeof(osver));