AC_MSG_FAILURE([This FRR version needs pthreads])
])
+AC_SEARCH_LIBS([pthread_condattr_setclock], [],
+ [frr_cv_pthread_condattr_setclock=yes],
+ [frr_cv_pthread_condattr_setclock=no])
+if test "$frr_cv_pthread_condattr_setclock" = yes; then
+ AC_DEFINE(HAVE_PTHREAD_CONDATTR_SETCLOCK, 1, [Have pthread.h pthread_condattr_setclock])
+fi
+
dnl --------------
dnl Check programs
dnl --------------
if test $ac_cv_lib_readline_rl_completion_matches = no; then
AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
fi
+ AC_SEARCH_LIBS([append_history], [readline], [frr_cv_append_history=yes], [frr_cv_append_history=no])
+ if test "$frr_cv_append_history" = yes; then
+ AC_DEFINE(HAVE_APPEND_HISTORY, 1, [Have history.h append_history])
+ fi
;;
esac
AC_SUBST(LIBREADLINE)
*/
uint32_t frr_pthread_get_id(void);
+#ifndef HAVE_PTHREAD_CONDATTR_SETCLOCK
+#define pthread_condattr_setclock(A, B)
+#endif
+
#endif /* _FRR_PTHREAD_H */
#include <malloc/malloc.h>
#endif
#include <dlfcn.h>
+#ifdef HAVE_LINK_H
#include <link.h>
+#endif
#include "log.h"
#include "memory.h"
return NULL;
}
-static char **new_completion(char *text, int start, int end)
+static char **new_completion(const char *text, int start, int end)
{
char **matches;
rl_initialize();
rl_bind_key('?', (rl_command_func_t *)vtysh_rl_describe);
rl_completion_entry_function = vtysh_completion_entry_function;
- rl_attempted_completion_function =
- (rl_completion_func_t *)new_completion;
+ rl_attempted_completion_function = new_completion;
}
char *vtysh_prompt(void)
#include <readline/readline.h>
#include <readline/history.h>
+/*
+ * The append_history function only appears in newer versions
+ * of the readline library it appears like. Since we don't
+ * need this just silently ignore the code on these
+ * ancient platforms.
+ */
+#if !defined HAVE_APPEND_HISTORY
+#define append_history(A, B)
+#endif
+
#include <lib/version.h>
#include "getopt.h"
#include "command.h"