diff options
author | George Joseph <gjoseph@digium.com> | 2016-11-14 11:16:03 -0700 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2016-11-14 11:16:03 -0700 |
commit | e2046bfaf37c403b8913151e33f43a2f8868bdc2 (patch) | |
tree | 06d405c13818980ea7a19621532b0261154fd64a /configure.ac | |
parent | 223ce4890c866788835a6fcc7c8582ecdc56dc63 (diff) |
cli: Fix ast_el_read_char to work with libedit >= 3.1
Libedit 3.1 is not build with unicode on as a default and so the
prototype for the el_gets callback changed from expecting a char buffer
to accepting a wchar buffer. If ast_el_read_char isn't changed,
the cli reads garbage from teh terminal.
Added a configure test for (*el_rfunc_t)(EditLine *, wchar_t *) and
updated ast_el_read_char to use the HAVE_ define to detemrine whether
to use char or wchar.
ASTERISK-26592 #close
Change-Id: I9099b46f68e06d0202ff80e53022a2b68b08871a
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index ce9c17843..735e16d6f 100644 --- a/configure.ac +++ b/configure.ac @@ -478,6 +478,7 @@ AST_EXT_LIB_SETUP([KQUEUE], [kqueue support], [kqueue]) AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap]) AST_LIBCURL_CHECK_CONFIG([], [7.10.1]) AST_EXT_LIB_SETUP([LIBEDIT], [NetBSD Editline library], [libedit], [, use 'internal' Editline otherwise]) +AST_EXT_LIB_SETUP_OPTIONAL([LIBEDIT_IS_UNICODE], [Libedit compiled for unicode], [LIBEDIT], [libedit]) AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2]) AST_EXT_LIB_SETUP([LIBXSLT], [LibXSLT], [libxslt]) AST_EXT_LIB_SETUP_OPTIONAL([LIBXSLT_CLEANUP], [LibXSLT Library Cleanup Function], [LIBXSLT], [libxslt]) @@ -1528,11 +1529,14 @@ if test "${USE_LIBEDIT}" != "no"; then if test "${LIBEDIT_SYSTEM}" = "yes"; then AST_PKG_CONFIG_CHECK(LIBEDIT, libedit) if test "$PBX_LIBEDIT" = "1"; then - LIBEDIT_INTERNAL="no" + LIBEDIT_INTERNAL="no" fi fi if test "${LIBEDIT_INTERNAL}" = "yes"; then PBX_LIBEDIT=1 + LIBEDIT_IS_UNICODE=no + else + AST_C_COMPILE_CHECK([LIBEDIT_IS_UNICODE], [el_rfunc_t *callback;], [histedit.h], [], [Testing for libedit unicode support]) fi fi |