Resolve KEY_EVENT conflict between Windows and ncurses.

This fixes the following compiler warning when building for Windows:

In file included from top.c:24:0:
/usr/local/mingw/ncurses/include/curses.h:1478:0: error: "KEY_EVENT" redefined [-Werror]
 #define KEY_EVENT 0633  /* We were interrupted by an event */
 ^
In file included from /usr/share/mingw-w64/include/windows.h:74:0,
                 from /usr/share/mingw-w64/include/winsock2.h:23,
                 from have.h:46,
                 from system.h:26,
                 from top.c:20:
/usr/share/mingw-w64/include/wincon.h:101:0: note: this is the location of the previous definition
 #define KEY_EVENT 0x1
 ^
This commit is contained in:
Etienne Dechamps 2014-07-12 13:32:23 +01:00
parent 5217c16db4
commit b2a6381ab2

View file

@ -21,6 +21,7 @@
#ifdef HAVE_CURSES
#undef KEY_EVENT /* There are conflicting declarations for KEY_EVENT in Windows wincon.h and curses.h. */
#include <curses.h>
#include "control_common.h"