[llvm] r256896 - Hopefully fix a mingw32 buildbot (i686-mingw32-RA-on-linux) which does not have

Yunzhong Gao via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 17:36:46 PST 2016


Author: ygao
Date: Tue Jan  5 19:36:45 2016
New Revision: 256896

URL: http://llvm.org/viewvc/llvm-project?rev=256896&view=rev
Log:
Hopefully fix a mingw32 buildbot (i686-mingw32-RA-on-linux) which does not have
the VersionHelpers.h header.


Modified:
    llvm/trunk/lib/Support/Windows/WindowsSupport.h

Modified: llvm/trunk/lib/Support/Windows/WindowsSupport.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/WindowsSupport.h?rev=256896&r1=256895&r2=256896&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/WindowsSupport.h (original)
+++ llvm/trunk/lib/Support/Windows/WindowsSupport.h Tue Jan  5 19:36:45 2016
@@ -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 <string>
 #include <vector>
 
-#ifndef __CYGWIN__
+#if !defined(__CYGWIN__) && \
+    !(defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR))
 #include <VersionHelpers.h>
 #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);




More information about the llvm-commits mailing list