File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44/* Python API mandates Python.h is included *first* */
55#include " Python.h"
66
7- #define PNG_SKIP_SETJMP_CHECK
8- #include < png.h>
9-
107#include " ft2font.h"
118#include " _image.h"
129#include " _backend_agg.h"
Original file line number Diff line number Diff line change 1+
2+ /* For linux, png.h must be imported before Python.h because
3+ png.h needs to be the one to define setjmp.
4+ Undefining _POSIX_C_SOURCE and _XOPEN_SOURCE stops a couple
5+ of harmless warnings.
6+ */
7+
8+ #ifdef __linux__
9+ # include < png.h>
10+ # ifdef _POSIX_C_SOURCE
11+ # undef _POSIX_C_SOURCE
12+ # endif
13+ # ifdef _XOPEN_SOURCE
14+ # undef _XOPEN_SOURCE
15+ # endif
16+ # include " Python.h"
17+ #else
18+
119/* Python API mandates Python.h is included *first* */
2- #include " Python.h"
20+ # include " Python.h"
321
4- #define PNG_SKIP_SETJMP_CHECK
5- #include < png.h >
22+ # include < png.h >
23+ #endif
624
725// TODO: Un CXX-ify this module
826#include " CXX/Extensions.hxx"
You can’t perform that action at this time.
0 commit comments