From bb5e9920d20767970c756698820c2406eb3a9728 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Thu, 6 Nov 2014 10:25:37 +0000 Subject: [PATCH] Squash a warning when compiling with a some curses library configurations. ncurses can optionally declare tigetstr(), tigetnum() and tigetflags() with a const char * argument, indicated by the NCURSES_CONST macro. So we use this macro, if available, to optionally declare cap2str.iname as const char *. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@530 13b04d17-f746-0410-82c6-800466cd88b0 --- source/term.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/term.c b/source/term.c index 8192981..06a16f5 100644 --- a/source/term.c +++ b/source/term.c @@ -103,7 +103,12 @@ extern char *getenv(); typedef struct cap2info { const char * longname; - const char * iname; +/* ncurses can optionally declare tigetstr(), tigetnum() and tigetflags() with + * a const char * argument. */ +#ifdef NCURSES_CONST +NCURSES_CONST +#endif + char * iname; const char * tname; int type; void * ptr;