Skip to content

Commit 47738f9

Browse files
committed
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 9104fa9 commit 47738f9

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

src/PythonQtInstanceWrapper.h

-22
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,6 @@
4646

4747
#include "PythonQtSystem.h"
4848

49-
/*
50-
* The following undefs for C standard library macros prevent
51-
* build errors of the following type on mac ox 10.7.4 and XCode 4.3.3
52-
*
53-
/usr/include/c++/4.2.1/bits/localefwd.h:57:21: error: too many arguments provided to function-like macro invocation
54-
isspace(_CharT, const locale&);
55-
^
56-
/usr/include/c++/4.2.1/bits/localefwd.h:56:5: error: 'inline' can only appear on functions
57-
inline bool
58-
^
59-
/usr/include/c++/4.2.1/bits/localefwd.h:57:5: error: variable 'isspace' declared as a template
60-
isspace(_CharT, const locale&);
61-
^
62-
*/
63-
#undef isspace
64-
#undef isupper
65-
#undef islower
66-
#undef isalpha
67-
#undef isalnum
68-
#undef toupper
69-
#undef tolower
70-
7149
#include <QPointer>
7250

7351
#include "structmember.h"

src/PythonQtPythonInclude.h

+23
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,27 @@
9292
# include <Python.h>
9393
#endif
9494

95+
/*
96+
* The following undefs for C standard library macros prevent
97+
* build errors of the following type on mac ox 10.7.4 and XCode 4.3.3
98+
*
99+
/usr/include/c++/4.2.1/bits/localefwd.h:57:21: error: too many arguments provided to function-like macro invocation
100+
isspace(_CharT, const locale&);
101+
^
102+
/usr/include/c++/4.2.1/bits/localefwd.h:56:5: error: 'inline' can only appear on functions
103+
inline bool
104+
^
105+
/usr/include/c++/4.2.1/bits/localefwd.h:57:5: error: variable 'isspace' declared as a template
106+
isspace(_CharT, const locale&);
107+
^
108+
*/
109+
#undef isspace
110+
#undef isupper
111+
#undef islower
112+
#undef isalpha
113+
#undef isalnum
114+
#undef toupper
115+
#undef tolower
116+
95117
#endif
118+

0 commit comments

Comments
 (0)