[Python-Dev] _cursesmodule linking, and portability

Mark Favas m.favas@per.dem.csiro.au
Sun, 23 Jul 2000 15:34:00 +0800

Earlier today I uploaded a patch to SF for _cursesmodule.c so that it
would link on Tru64 Unix (Version 4.0F). The problem was that the
function has_key() is not present on this platform (nor, apparently, on
SGI or Sun). Moshe queried whether this patch was required to link
against ncurses on Tru64. ncurses does not exist on Tru64. Access to the
functionality of V 4 of the X/Open curses API spec is enabled by the
macro _XOPEN_SOURCE_EXTENDED - neither the header file nor the (only)
curses library have any reference to has_key(). I am not a curses person
(except when... <wink>), so I do not know whether has_key() is part of
the _standard_ (new?) curses, but I am concerned that the
_cursesmodule.c code exposes this interface for all but SGI, Sun and
Tru64 systems. What happens when Python code is written that uses this
function? It will fail on at least these three platforms... Should the
has_key() function be removed, or a wrapper written for those systems
that don't support this function?
Email  - m.favas@per.dem.csiro.au        Mark C Favas
Phone  - +61 8 9333 6268, 0418 926 074   CSIRO Exploration & Mining
Fax    - +61 8 9383 9891                 Private Bag No 5, Wembley
WGS84  - 31.95 S, 115.80 E               Western Australia 6913