X-Git-Url: https://git.deb.at/?p=pkg%2Fabook.git;a=blobdiff_plain;f=abook_rl.c;h=55b303965cfaa972caacbc280357991694f03f3a;hp=7e51aa14a672bbcaddd477227311823a3f267be5;hb=a2d4ea58437d93297c7f7e2e8efd4d48297ca46a;hpb=9d3c228a31b33038c69861f59e50b2c2de1e825a diff --git a/abook_rl.c b/abook_rl.c index 7e51aa1..55b3039 100644 --- a/abook_rl.c +++ b/abook_rl.c @@ -21,7 +21,7 @@ #elif defined(HAVE_READLINE_H) # include #else -# error "You don't seem to have readhline.h" +# error "You don't seem to have readline.h" # error "No HAVE_READLINE_READLINE_H or HAVE_READLINE_H defined" #endif @@ -94,11 +94,16 @@ rline_prep_terminal(int dummy) #if (RL_VERSION_MAJOR == 4 && RL_VERSION_MINOR > 2) || (RL_VERSION_MAJOR > 4) /* nothing */ #else -# warning "You seem to have rather old readline version or non-GNU \ -version of the readline. If you have problems please use \ + /* + * #warning is an extension. Not all compilers support it. + */ +# ifdef __GNUC__ +# warning "You seem to have rather old readline version or \ +non-GNU version of it. If you have problems please use \ GNU readline 4.3 or newer. \ GNU readline versions 4.0, 4.1 and 4.2 should be OK despite \ of this warning." +# endif /* * this kludge avoids older readline libraries to print a newline */ @@ -161,7 +166,7 @@ abook_rl_init(bool use_completion) } char * -abook_readline(WINDOW *w, int y, int x, char *s, int limit, bool use_completion) +abook_readline(WINDOW *w, int y, int x, char *s, bool use_completion) { char *ret;