From 7b8ee13058bc0b366983ce8228612e75f8dd9ca8 Mon Sep 17 00:00:00 2001 From: Steve Pieper Date: Thu, 12 Jul 2012 16:11:06 -0400 Subject: [PATCH] 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 --- src/PythonQtInstanceWrapper.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/PythonQtInstanceWrapper.h b/src/PythonQtInstanceWrapper.h index 761c8448..7b06e7c6 100644 --- a/src/PythonQtInstanceWrapper.h +++ b/src/PythonQtInstanceWrapper.h @@ -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 #include "structmember.h"