Skip to content

Commit 4ce028d

Browse files
pieperjcfr
authored andcommitted
[commontk] Fix mac build error with C standard lib macros
This fix errors of that sort: moc_PythonQtStdDecorators.cxx:152:25: error: expected unqualified-id case 4: _t->emit((*reinterpret_cast< QObject*(*)>(_a[1])),(*reinterpret_cast< const Add fix for mac build error related C standard lib macros to main header By updating PythonQtPythonIncludes.h which is included in all PythonQt headers, it is ensured the fix will be applied consistently.
1 parent 8a50eaa commit 4ce028d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/PythonQtPythonInclude.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,27 @@
139139
#define PyBytes_FromStringAndSize PyString_FromStringAndSize
140140
#endif
141141

142+
/*
143+
* The following undefs for C standard library macros prevent
144+
* build errors of the following type on mac ox 10.7.4 and XCode 4.3.3
145+
*
146+
/usr/include/c++/4.2.1/bits/localefwd.h:57:21: error: too many arguments provided to function-like macro invocation
147+
isspace(_CharT, const locale&);
148+
^
149+
/usr/include/c++/4.2.1/bits/localefwd.h:56:5: error: 'inline' can only appear on functions
150+
inline bool
151+
^
152+
/usr/include/c++/4.2.1/bits/localefwd.h:57:5: error: variable 'isspace' declared as a template
153+
isspace(_CharT, const locale&);
154+
^
155+
*/
156+
#undef isspace
157+
#undef isupper
158+
#undef islower
159+
#undef isalpha
160+
#undef isalnum
161+
#undef toupper
162+
#undef tolower
163+
142164
#endif
165+

0 commit comments

Comments
 (0)