Skip to content

Commit

Permalink
Fix mac build error with C standard lib macros
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pieper authored and jcfr committed Jul 12, 2012
1 parent 654f324 commit 7b8ee13
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/PythonQtInstanceWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,29 @@
#include "PythonQtPythonInclude.h"

#include "PythonQtSystem.h"

/*
* The following undefs for C standard library macros prevent
* build errors of the following type on mac ox 10.7.4 and XCode 4.3.3
*
/usr/include/c++/4.2.1/bits/localefwd.h:57:21: error: too many arguments provided to function-like macro invocation
isspace(_CharT, const locale&);
^
/usr/include/c++/4.2.1/bits/localefwd.h:56:5: error: 'inline' can only appear on functions
inline bool
^
/usr/include/c++/4.2.1/bits/localefwd.h:57:5: error: variable 'isspace' declared as a template
isspace(_CharT, const locale&);
^
*/
#undef isspace
#undef isupper
#undef islower
#undef isalpha
#undef isalnum
#undef toupper
#undef tolower

#include <QPointer>

#include "structmember.h"
Expand Down

0 comments on commit 7b8ee13

Please sign in to comment.