Skip to content

Commit

Permalink
Add fix for mac build error related C standard lib macros to main header
Browse files Browse the repository at this point in the history
By updating PythonQtPythonIncludes.h which is included in all PythonQt
headers, it is ensured the fix will be applied consistently.
  • Loading branch information
jcfr committed Jul 12, 2012
1 parent 9104fa9 commit 47738f9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/PythonQtInstanceWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,6 @@

#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
23 changes: 23 additions & 0 deletions src/PythonQtPythonInclude.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,27 @@
# include <Python.h>
#endif

/*
* 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

#endif

0 comments on commit 47738f9

Please sign in to comment.