Draft: cli: optionally support libedit instead of readline
For preconfigured, closed embedded devices, the inclusion of GPLv3 software components is not possible. For NetworkManager this affects libreadline, which is used by nmcli. This change allows compiling with libedit instead of libreadline.
Support for editline seams to be broken. Therefore it gets removed.
-
Test build with autotools (readline / libedit) -
Test build with meson -
Test libedit linked nmcli -
Fix incompatible pointer types [490/872] Compiling C object src/nmcli/nmcli.p/agent.c.o ../src/nmcli/agent.c: In function ‘get_secrets_from_user’: ../src/nmcli/agent.c:92:31: warning: assignment to ‘int (*)(const char *, int)’ from incompatible pointer type ‘int (*)(void)’ [-Wincompatible-pointer-types] 92 | rl_startup_hook = set_deftext; | ^ [493/872] Compiling C object src/nmcli/nmcli.p/common.c.o ../src/nmcli/common.c: In function ‘get_secrets_from_user’: ../src/nmcli/common.c:705:50: warning: assignment to ‘int (*)(const char *, int)’ from incompatible pointer type ‘int (*)(void)’ [-Wincompatible-pointer-types] 705 | rl_startup_hook = nmc_rl_set_deftext; | ^ [494/872] Compiling C object src/nmcli/nmcli.p/connections.c.o ../src/nmcli/connections.c: In function ‘nmcli_editor_tab_completion’: ../src/nmcli/connections.c:6517:64: warning: assignment to ‘void (*)(void)’ from incompatible pointer type ‘void (*)(char **, int, int)’ [-Wincompatible-pointer-types] 6517 | rl_completion_display_matches_hook = uuid_display_hook; | ^ ../src/nmcli/connections.c:6564:60: warning: assignment to ‘void (*)(void)’ from incompatible pointer type ‘void (*)(char **, int, int)’ [-Wincompatible-pointer-types] 6564 | rl_completion_display_matches_hook = uuid_display_hook; | ^ ../src/nmcli/connections.c: In function ‘property_edit_submenu’: ../src/nmcli/connections.c:7358:29: warning: assignment to ‘int (*)(const char *, int)’ from incompatible pointer type ‘int (*)(void)’ [-Wincompatible-pointer-types] 7358 | rl_startup_hook = nmc_rl_set_deftext; | ^
Edited by Adrian Freihofer