Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix the swab bug to compile on solaris system #6628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 24, 2016
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