From 352db463ea13e941841fe5bd347f78da071bdbed Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sun, 12 Apr 2020 20:15:32 +0000 Subject: [PATCH] Add new DEBIAN_HATES_YOU define for people using Debian where the "real" ncurses.h is installed as /usr/include/ncursesw/ncurses.h --- src/conio/GNUmakefile | 4 ++++ src/conio/curs_fix.h | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/conio/GNUmakefile b/src/conio/GNUmakefile index 6306853146..590d055351 100644 --- a/src/conio/GNUmakefile +++ b/src/conio/GNUmakefile @@ -42,6 +42,10 @@ ifeq ($(os),netbsd) endif endif +ifeq ($(shell [ -e /usr/include/ncursesw/ncurses.h ] ; then echo YES ; fi),YES) + CFLAGS += -DDEBIAN_HATES_YOU +endif + ifdef NEED_BITMAP OBJS += $(MTOBJODIR)$(DIRSEP)bitmap_con$(OFILE) endif diff --git a/src/conio/curs_fix.h b/src/conio/curs_fix.h index e664f904df..60ed80d13a 100644 --- a/src/conio/curs_fix.h +++ b/src/conio/curs_fix.h @@ -34,14 +34,16 @@ #define NCURSES_WIDECHAR 1 #ifdef XCURSES #include <xcurses.h> -#endif - -#ifdef N_CURSES_LIB - #include <ncurses.h> -#endif - -#if defined(CURSES_LIB) || (!defined(XCURSES)&&!defined(N_CURSES_LIB)) - #include <curses.h> +#else + #ifdef N_CURSES_LIB + #include <ncurses.h> + #else + #ifdef DEBIAN_HATES_YOU + #include <ncursesw/ncurses.h> + #else + #include <curses.h> + #endif + #endif #endif #ifndef ACS_SBSD -- GitLab