From: Andre Noll Date: Tue, 22 Apr 2014 00:30:02 +0000 (+0200) Subject: Merge branch 't/rl_free_keymap' X-Git-Tag: v0.5.3~25 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=a731a7c6e78fb137268b42062d9fb08b4e49a2c8;hp=eb98705eed9978052f090b20684eeba935c5a913;p=paraslash.git Merge branch 't/rl_free_keymap' Cooking since 2014-03-10. * t/rl_free_keymap: build: Check whether rl_free_keymap is declared. --- diff --git a/configure.ac b/configure.ac index 07ecffdd..30bce8ee 100644 --- a/configure.ac +++ b/configure.ac @@ -757,7 +757,15 @@ if test "$have_readline" = "yes"; then fi if test "$have_readline" = "yes"; then - : + AC_CHECK_DECL( + [rl_free_keymap], + [AC_DEFINE(RL_FREE_KEYMAP_DECLARED, 1, readline >= 6.3)], + [], + [ + #include + #include + ] + ) AC_SUBST(readline_cppflags) AC_SUBST(readline_ldflags) AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support) diff --git a/interactive.c b/interactive.c index ee953bf1..9f2b7195 100644 --- a/interactive.c +++ b/interactive.c @@ -227,6 +227,7 @@ static void wipe_bottom_line(void) fprintf(i9ep->stderr_stream, "\r"); } +#ifndef RL_FREE_KEYMAP_DECLARED /** * Free all storage associated with a keymap. * @@ -237,6 +238,7 @@ static void wipe_bottom_line(void) * \param keymap The keymap to deallocate. */ void rl_free_keymap(Keymap keymap); +#endif /** * Reset the terminal and save the in-memory command line history.