From: Yunzhong Gao Date: Wed, 6 Jan 2016 01:36:45 +0000 (+0000) Subject: Hopefully fix a mingw32 buildbot (i686-mingw32-RA-on-linux) which does not have X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f776cd591c27d75e99403909468c14fd8d7b9d1c;p=oota-llvm.git Hopefully fix a mingw32 buildbot (i686-mingw32-RA-on-linux) which does not have the VersionHelpers.h header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256896 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/Windows/WindowsSupport.h b/lib/Support/Windows/WindowsSupport.h index 5e5163b3493..2e75d1674a3 100644 --- a/lib/Support/Windows/WindowsSupport.h +++ b/lib/Support/Windows/WindowsSupport.h @@ -31,7 +31,9 @@ #define _WIN32_IE 0x0800 // MinGW at it again. FIXME: verify if still needed. #define WIN32_LEAN_AND_MEAN #define NOGDI +#ifndef NOMINMAX #define NOMINMAX +#endif #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" @@ -46,10 +48,12 @@ #include #include -#ifndef __CYGWIN__ +#if !defined(__CYGWIN__) && \ + !(defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) #include #else // Cygwin does not have the IsWindows8OrGreater() API. +// Mingw32 does not have the API either (but mingw-w64 does). inline bool IsWindows8OrGreater() { OSVERSIONINFO osvi = {}; osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);