Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 761e601

Browse filesBrowse files
committed
fix the swab bug to compile on solaris system
on smartos will met below error when try to build: In file included from /opt/local/include/python2.7/Python.h:44:0, from src/mplutils.h:21, from src/ft2font_wrapper.cpp:1: /usr/include/unistd.h:521:75: error: declaration of C function 'void swab(const void*, void*, ssize_t)' conflicts with In file included from /opt/local/include/python2.7/Python.h:42:0, from src/mplutils.h:21, from src/ft2font_wrapper.cpp:1: /usr/include/stdlib.h:170:13: error: previous declaration 'void swab(const char*, char*, ssize_t)' here error: command 'gcc' failed with exit status 1 Signed-off-by: Frank Yu <flyxiaoyu@gmail.com>
1 parent f8ea2c5 commit 761e601
Copy full SHA for 761e601

File tree

Expand file treeCollapse file tree

2 files changed

+13
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-0
lines changed

‎src/mplutils.h

Copy file name to clipboardExpand all lines: src/mplutils.h
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ typedef unsigned __int8 uint8_t;
1818
# undef _XOPEN_SOURCE
1919
#endif
2020

21+
#if defined(__sun) || defined(sun)
22+
#if defined(_XPG4)
23+
#undef _XPG4
24+
#endif
25+
#endif
26+
2127
#include <Python.h>
2228

2329
#if PY_MAJOR_VERSION >= 3

‎src/numpy_cpp.h

Copy file name to clipboardExpand all lines: src/numpy_cpp.h
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
# undef _XOPEN_SOURCE
2626
#endif
2727

28+
29+
#if defined(__sun) || defined(sun)
30+
#if defined(_XPG4)
31+
#undef _XPG4
32+
#endif
33+
#endif
34+
2835
#include <Python.h>
2936
#include <numpy/ndarrayobject.h>
3037

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.