From 3cf861a8cebceb92b6a2e79500d1cd61e694a533 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <daniel.molkentin@nokia.com>
Date: Thu, 10 Dec 2009 16:20:34 +0100
Subject: [PATCH] Add windows definitions to make the code model happy.

__stdcall for all compilers (MSVC and MinGW, possibly others may use it)
__w64 is MSVC only, deprecated there, but still used in some places

Reviewed-By: Roberto Raggi
(cherry picked from commit 5832c6b584cc477db12f8ac843c15ce12cea1cb1)
---
 src/plugins/cpptools/cppmodelmanager.cpp  | 1 +
 src/plugins/projectexplorer/toolchain.cpp | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index 5cae6bdeaf3..189340777ad 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -152,6 +152,7 @@ static const char pp_configuration[] =
 
     // ### add macros for win32
     "#define __cdecl\n"
+    "#define __stdcall\n"
     "#define QT_WA(x) x\n"
     "#define API\n"
     "#define WINAPI\n"
diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp
index df0f2e405d2..585836423a0 100644
--- a/src/plugins/projectexplorer/toolchain.cpp
+++ b/src/plugins/projectexplorer/toolchain.cpp
@@ -333,6 +333,7 @@ QByteArray MSVCToolChain::predefinedMacros()
 {
     if (m_predefinedMacros.isEmpty()) {
         m_predefinedMacros += "#define __MSVCRT__\n"
+                              "#define __w64\n"
                               "#define __int64 long long\n"
                               "#define __int32 long\n"
                               "#define __int16 short\n"
-- 
GitLab