10000 fix the swab bug to compile on solaris system by FrankYu · Pull Request #6628 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/mplutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ typedef unsigned __int8 uint8_t;
# undef _XOPEN_SOURCE
#endif

// Prevent multiple conflicting definitions of swab from stdlib.h and unistd.h
#if defined(__sun) || defined(sun)
#if defined(_XPG4)
#undef _XPG4
#endif
#if defined(_XPG3)
#undef _XPG3
#endif
#endif

#include <Python.h>

#if PY_MAJOR_VERSION >= 3
Expand Down
10 changes: 10 additions & 0 deletions src/numpy_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
# undef _XOPEN_SOURCE
#endif

// Prevent multiple conflicting definitions of swab from stdlib.h and unistd.h
#if defined(__sun) || defined(sun)
#if defined(_XPG4)
#undef _XPG4
#endif
#if defined(_XPG3)
#undef _XPG3
#endif
#endif

#include <Python.h>
#include <numpy/ndarrayobject.h>

Expand Down
0