Skip to content
Snippets Groups Projects
Commit 070d06c1 authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Changed BLOCKS undef on MacOS to work with system header files.

parent e3e6797f
No related branches found
No related tags found
No related merge requests found
......@@ -177,10 +177,11 @@ QByteArray GccToolChain::predefinedMacros()
#ifdef Q_OS_MAC
// 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) {
idx = m_predefinedMacros.indexOf('1', idx);
m_predefinedMacros[idx] = '0';
m_predefinedMacros.replace(idx, blocksDefine.length(), blocksUndefine);
}
// Define __strong and __weak (used for Apple's GC extension of C) to be empty
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment