forked from qt-creator/qt-creator
Changed BLOCKS undef on MacOS to work with system header files.
This commit is contained in:
@@ -177,10 +177,11 @@ QByteArray GccToolChain::predefinedMacros()
|
|||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
// Turn off flag indicating Apple's blocks support
|
// Turn off flag indicating Apple's blocks support
|
||||||
int idx = m_predefinedMacros.indexOf("#define __BLOCKS__ 1");
|
const QByteArray blocksDefine("#define __BLOCKS__ 1");
|
||||||
|
const QByteArray blocksUndefine("#undef __BLOCKS__");
|
||||||
|
int idx = m_predefinedMacros.indexOf(blocksDefine);
|
||||||
if (idx != -1) {
|
if (idx != -1) {
|
||||||
idx = m_predefinedMacros.indexOf('1', idx);
|
m_predefinedMacros.replace(idx, blocksDefine.length(), blocksUndefine);
|
||||||
m_predefinedMacros[idx] = '0';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define __strong and __weak (used for Apple's GC extension of C) to be empty
|
// Define __strong and __weak (used for Apple's GC extension of C) to be empty
|
||||||
|
|||||||
Reference in New Issue
Block a user