forked from qt-creator/qt-creator
PCH build fix when building with Clang 12
Clang 12 has added a template parameter as "CALLBACK", which conflicts with the Windows "CALLBACK" define. Change-Id: I773899d103dcb1a852b555a1900b2de4acb6d96f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
#define CALLBACK WINAPI
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#endif
|
#endif
|
||||||
|
@@ -36,6 +36,7 @@
|
|||||||
#include <QStack>
|
#include <QStack>
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
#define CALLBACK WINAPI
|
||||||
#include <qt_windows.h>
|
#include <qt_windows.h>
|
||||||
#else
|
#else
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
// for windows progress bar
|
// for windows progress bar
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
|
# define CALLBACK WINAPI
|
||||||
# include <shobjidl.h>
|
# include <shobjidl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#define CALLBACK WINAPI
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <objbase.h>
|
#include <objbase.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
|
@@ -50,6 +50,9 @@
|
|||||||
#undef ERROR
|
#undef ERROR
|
||||||
#undef ABSOLUTE
|
#undef ABSOLUTE
|
||||||
|
|
||||||
|
// LLVM 12 comes with CALLBACK as a template argument
|
||||||
|
#undef CALLBACK
|
||||||
|
|
||||||
#define _POSIX_
|
#define _POSIX_
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#undef _POSIX_
|
#undef _POSIX_
|
||||||
|
Reference in New Issue
Block a user