X-Git-Url: https://git.tokkee.org/?p=liboping.git;a=blobdiff_plain;f=src%2Foping.c;h=4a605534e7e608694d475443ca615328c42b5156;hp=a19c42064b3a22758263cfa3ba2724db48507d0c;hb=94a8bf0d6c869b1e6bde637dd25666d2f4cb7052;hpb=564bf1c1751ffca23848510a8a9559a14b9559ee diff --git a/src/oping.c b/src/oping.c index a19c420..4a60553 100644 --- a/src/oping.c +++ b/src/oping.c @@ -81,7 +81,12 @@ # define NCURSES_OPAQUE 1 /* http://newsgroups.derkeiler.com/Archive/Rec/rec.games.roguelike.development/2010-09/msg00050.html */ # define _X_OPEN_SOURCE_EXTENDED -# include + +# if HAVE_NCURSESW_NCURSES_H +# include +# elif HAVE_NCURSES_H +# include +# endif # define OPING_GREEN 1 # define OPING_YELLOW 2 @@ -652,6 +657,7 @@ static void time_calc (struct timespec *ts_dest, /* {{{ */ #if USE_NCURSES static _Bool has_utf8() /* {{{ */ { +# if HAVE_NCURSESW_NCURSES_H if (!opt_utf8) { /* Automatically determine */ @@ -661,6 +667,9 @@ static _Bool has_utf8() /* {{{ */ opt_utf8 = 1; } return ((_Bool) (opt_utf8 - 1)); +# else + return (0); +# endif } /* }}} _Bool has_utf8 */ static int update_prettyping_graph (ping_context_t *ctx, /* {{{ */