Ticket #3665: fix compatibility with netbsd curses.
commit38d4c655d322837574e957b4a824f4a0d1bb3b86
authorrofl0r <retnyg@gmx.net>
Mon, 18 Jul 2016 21:19:56 +0000 (18 22:19 +0100)
committerAndrew Borodin <aborodin@vmail.ru>
Fri, 29 Jul 2016 06:21:02 +0000 (29 09:21 +0300)
tree19bbfc36da2d385f95a60fb2fa2765b24ff35a39
parent837a21009ed843490f8820ebe7d0e15252ad39f0
Ticket #3665: fix compatibility with netbsd curses.

The code that manipulates the ncurses backend into changing
the key combination to generate SIGINT from CTRL-c to CTRL-g does
so by accessing undocumented internal ncurses data structures.
This breaks compilation with netbsd-curses[0], and could also break
when the ncurses author decides to change internal structures in a
future release.

Fix it by using a portable approach that works everywhere using libc
primitives instead.

[0] https://github.com/sabotage-linux/netbsd-curses

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
lib/tty/tty-ncurses.c