Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] 2.1.0rc1 available for testing

Roger Light via mosquitto-dev <mosquitto-dev@xxxxxxxxxxx> writes:

> On Wed, 21 Jan 2026 at 10:15, c--- via mosquitto-dev
> <mosquitto-dev@xxxxxxxxxxx> wrote:
>
>> - I couldn’t get apps/mosquitto_ctrl to compile because Xcode has readline 0x0402 installed
>> (urrent readline version is 0x0803!) and overriding EDITLINE_DIR wasn’t successful (I am not a cmake expert):
>> ```
>> [ 26%] Building C object apps/mosquitto_ctrl/CMakeFiles/ctrl_shell.dir/ctrl_shell.c.o
>> In file included from /Users/ckrey/mosquitto/apps/mosquitto_ctrl/ctrl_shell.c:40:
>> /Users/ckrey/mosquitto/apps/mosquitto_ctrl/ctrl_shell_internal.h:38:2: error: unknown type name 'rl_vcpfunc_t'
>>    38 |         rl_vcpfunc_t *line_callback;
>>       |         ^
>
> Yes, this is a pain. It uses editline for license reasons, but with
> the readline compatible interface. I didn't realise this wasn't
> commonplace.

It is normal to use editline's readline-compatible interface, but then

  - need to warn in READLINE-compiling that editline has to be in scope
    before system readline on macs

  - need some way to include editline's readline that works in both
    "install editline on linux" and "editline is built into netbsd".

NetBSD has

  /usr/include/histedit.h (editline native interface)
  /usr/include/readline/readline.h (editline readline compatible
  interface)

the portable library, when built in pkgsrc has

  include/editline/history.h
  include/editline/readline.h
  include/histedit.h
  lib/libedit.la
  lib/pkgconfig/libedit.pc



so maybe the "find editline" should either

  if NetBSD, accept base.  otherwise, expect portable

and the #include part should be ifdefed on portable-editline  vs
editline-is-native as

#ifdef HAVE_NATIVE_EDITLINE
#include <readline/readline.h>
#else
#include <reedline/readline.h>
#fi

But maybe that can be

AC_CHECK_HEADER(editline/readline.h)
if that failed: AC_CHECK_HEADER(readline/readline.h>

and then use the HAVE_EDITLINE_READLINE_H / HAVE_READLINE_READLINE_H


Back to the top