Skip to content

Commit

Permalink
Merge pull request #6628 from FrankYu/master
Browse files Browse the repository at this point in the history
fix the swab bug to compile on solaris system
  • Loading branch information
WeatherGod committed Jun 24, 2016
2 parents f8ea2c5 + 8bfae27 commit 5de9c44
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/mplutils.h
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
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 comments on commit 5de9c44

Please sign in to comment.