Skip to content

Commit 2e5120a

Browse files
pieperjcfr
authored andcommitted
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 19399f3 commit 2e5120a

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
@@ -121,4 +121,27 @@
121121
#define PyBytes_FromStringAndSize PyString_FromStringAndSize
122122
#endif
123123

124+
/*
125+
* The following undefs for C standard library macros prevent
126+
* build errors of the following type on mac ox 10.7.4 and XCode 4.3.3
127+
*
128+
/usr/include/c++/4.2.1/bits/localefwd.h:57:21: error: too many arguments provided to function-like macro invocation
129+
isspace(_CharT, const locale&);
130+
^
131+
/usr/include/c++/4.2.1/bits/localefwd.h:56:5: error: 'inline' can only appear on functions
132+
inline bool
133+
^
134+
/usr/include/c++/4.2.1/bits/localefwd.h:57:5: error: variable 'isspace' declared as a template
135+
isspace(_CharT, const locale&);
136+
^
137+
*/
138+
#undef isspace
139+
#undef isupper
140+
#undef islower
141+
#undef isalpha
142+
#undef isalnum
143+
#undef toupper
144+
#undef tolower
145+
124146
#endif
147+

0 commit comments

Comments
 (0)