[issue28190] Detect curses headers correctly for cross-compiling
Chi Hsuan Yen
report at bugs.python.org
Fri Dec 9 22:41:23 EST 2016
Chi Hsuan Yen added the comment:
> The only change that is needed here is to not include /usr/include/ncursesw in setup.py when cross compiling
No. Lots of codes in _cursesmodule.c need to know whether it's ncursesw, ncurses, or SysV's curses. For example: (segments below are from unpatched codebase)
#if !defined(__hpux) || defined(HAVE_NCURSES_H)
/* On HP/UX 11, these are of type cchar_t, which is not an
integral type. If this is a problem on more platforms, a
configure test should be added to determine whether ACS_S1
is of integral type. */
SetDictInt("ACS_S1", (ACS_S1));
SetDictInt("ACS_S9", (ACS_S9));
SetDictInt("ACS_DIAMOND", (ACS_DIAMOND));
SetDictInt("ACS_CKBOARD", (ACS_CKBOARD));
SetDictInt("ACS_DEGREE", (ACS_DEGREE));
SetDictInt("ACS_PLMINUS", (ACS_PLMINUS));
SetDictInt("ACS_BULLET", (ACS_BULLET));
SetDictInt("ACS_LARROW", (ACS_LARROW));
SetDictInt("ACS_RARROW", (ACS_RARROW));
SetDictInt("ACS_DARROW", (ACS_DARROW));
SetDictInt("ACS_UARROW", (ACS_UARROW));
SetDictInt("ACS_BOARD", (ACS_BOARD));
SetDictInt("ACS_LANTERN", (ACS_LANTERN));
SetDictInt("ACS_BLOCK", (ACS_BLOCK));
#endif
And
static int
PyCurses_ConvertToCchar_t(PyCursesWindowObject *win, PyObject *obj,
chtype *ch
#ifdef HAVE_NCURSESW
, wchar_t *wch
#endif
)
So detecting ncurses's actual include path is necessary.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28190>
_______________________________________
More information about the Python-bugs-list
mailing list