]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: remove libreadline support
authorChristoph Hellwig <hch@lst.de>
Sat, 9 May 2020 17:08:44 +0000 (13:08 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Sat, 9 May 2020 17:08:44 +0000 (13:08 -0400)
libreadline has been relicensed to GPLv3 and thus incompatible to
xfsprogs many years ago, and all the distros have dropped or are
in the stages of dropping the last GPLv2 version.  As the BSD
licensed libeditline provides the same functionality there is no
need to keep the obsolete libreadline support around.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
configure.ac
db/Makefile
db/input.c
growfs/Makefile
include/builddefs.in
io/Makefile
libxcmd/Makefile
libxcmd/input.c
quota/Makefile
spaceman/Makefile

index fbb51592d001d3a95ea85468cb95241a18c16224..ba79e16464c50434dc416ce4295e640c210ab2a4 100644 (file)
@@ -42,13 +42,6 @@ AC_ARG_ENABLE(blkid,
        enable_blkid=yes)
 AC_SUBST(enable_blkid)
 
-AC_ARG_ENABLE(readline,
-[  --enable-readline=[yes/no] Enable readline command editing [default=no]],
-       test $enable_readline = yes && libreadline="-lreadline",
-       enable_readline=no)
-AC_SUBST(libreadline)
-AC_SUBST(enable_readline)
-
 AC_ARG_ENABLE(editline,
 [  --enable-editline=[yes/no] Enable editline command editing [default=no]],
        test $enable_editline = yes && libeditline="-ledit",
index ed9f56c2143e3e751d3420002997383d79b4a82b..9bd9bf514f5db3b750f881a65b6546e67ed9f569 100644 (file)
@@ -21,11 +21,6 @@ LLDLIBS      = $(LIBXFS) $(LIBXLOG) $(LIBFROG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
 LTDEPENDENCIES = $(LIBXFS) $(LIBXLOG) $(LIBFROG)
 LLDFLAGS += -static-libtool-libs
 
-ifeq ($(ENABLE_READLINE),yes)
-LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP)
-CFLAGS += -DENABLE_READLINE
-endif
-
 ifeq ($(ENABLE_EDITLINE),yes)
 LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
 CFLAGS += -DENABLE_EDITLINE
index 4d6c73761b0ba364401497990feff07993d26860..553025bc926212eadf9855fc3fd2b8eb62911002 100644 (file)
 #include "malloc.h"
 #include "init.h"
 
-#if defined(ENABLE_READLINE)
-# include <readline/history.h>
-# include <readline/readline.h>
-#elif defined(ENABLE_EDITLINE)
+#ifdef ENABLE_EDITLINE
 # include <histedit.h>
 #endif
 
@@ -211,26 +208,7 @@ fetchline_internal(void)
        return rval;
 }
 
-#ifdef ENABLE_READLINE
-char *
-fetchline(void)
-{
-       char    *line;
-
-       if (inputstacksize == 1) {
-               line = readline(get_prompt());
-               if (!line)
-                       dbprintf("\n");
-               else if (line && *line) {
-                       add_history(line);
-                       logprintf("%s", line);
-               }
-       } else {
-               line = fetchline_internal();
-       }
-       return line;
-}
-#elif defined(ENABLE_EDITLINE)
+#ifdef ENABLE_EDITLINE
 static char *el_get_prompt(EditLine *e) { return get_prompt(); }
 char *
 fetchline(void)
index 4104cc0da89775b26b6a9fe6d60c6e10889cb9bd..a107d348ab6d6cde947e898599de0c28db833acd 100644 (file)
@@ -10,9 +10,6 @@ LTCOMMAND = xfs_growfs
 CFILES = xfs_growfs.c
 
 LLDLIBS = $(LIBXFS) $(LIBXCMD) $(LIBFROG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD)
-ifeq ($(ENABLE_READLINE),yes)
-LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP)
-endif
 
 ifeq ($(ENABLE_EDITLINE),yes)
 LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
index 6ed9d29514125f8dbf6112e5ec141314b5fe161e..30b2727a8db403f2aa287c942fd6f9ede2ac6c9e 100644 (file)
@@ -25,7 +25,6 @@ LIBUUID = @libuuid@
 LIBPTHREAD = @libpthread@
 LIBTERMCAP = @libtermcap@
 LIBEDITLINE = @libeditline@
-LIBREADLINE = @libreadline@
 LIBBLKID = @libblkid@
 LIBDEVMAPPER = @libdevmapper@
 LIBXFS = $(TOPDIR)/libxfs/libxfs.la
@@ -82,7 +81,6 @@ RPM_VERSION   = @rpm_version@
 ENABLE_SHARED  = @enable_shared@
 ENABLE_GETTEXT = @enable_gettext@
 ENABLE_EDITLINE        = @enable_editline@
-ENABLE_READLINE        = @enable_readline@
 ENABLE_BLKID   = @enable_blkid@
 ENABLE_SCRUB   = @enable_scrub@
 
index 1112605e115ee993915a0de8c196109f70897eb1..7174192681683022d9e2951451a04e3e659b8be5 100644 (file)
@@ -68,10 +68,6 @@ ifeq ($(HAVE_SYNCFS),yes)
 LCFLAGS += -DHAVE_SYNCFS
 endif
 
-ifeq ($(ENABLE_READLINE),yes)
-LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP)
-endif
-
 ifeq ($(ENABLE_EDITLINE),yes)
 LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
 endif
index f9bc1c5c483aa6a0cf0c881b8320804afe51d031..70e54308c34b84d1daffc9b276b800dc0759b359 100644 (file)
@@ -14,11 +14,6 @@ LTLDFLAGS += -static
 
 CFILES = command.c input.c help.c quit.c
 
-ifeq ($(ENABLE_READLINE),yes)
-LCFLAGS += -DENABLE_READLINE
-LTLIBS += $(LIBREADLINE) $(LIBTERMCAP)
-endif
-
 ifeq ($(ENABLE_EDITLINE),yes)
 LCFLAGS += -DENABLE_EDITLINE
 LTLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
index 137856e3b320d0410b57d648afad8b6e61fe8f35..203110df7a0b56b152da248b12a3443dad18f3b6 100644 (file)
@@ -9,10 +9,7 @@
 #include <ctype.h>
 #include <stdbool.h>
 
-#if defined(ENABLE_READLINE)
-# include <readline/history.h>
-# include <readline/readline.h>
-#elif defined(ENABLE_EDITLINE)
+#ifdef ENABLE_EDITLINE
 # include <histedit.h>
 #endif
 
@@ -28,18 +25,7 @@ get_prompt(void)
        return prompt;
 }
 
-#if defined(ENABLE_READLINE)
-char *
-fetchline(void)
-{
-       char    *line;
-
-       line = readline(get_prompt());
-       if (line && *line)
-               add_history(line);
-       return line;
-}
-#elif defined(ENABLE_EDITLINE)
+#ifdef ENABLE_EDITLINE
 static char *el_get_prompt(EditLine *e) { return get_prompt(); }
 char *
 fetchline(void)
index 384f023ad1675907066b48808c0d8c903821d44f..da5a1489e468b2828e14bd72b183186d448363e5 100644 (file)
@@ -14,11 +14,6 @@ LLDLIBS = $(LIBXCMD) $(LIBFROG)
 LTDEPENDENCIES = $(LIBXCMD) $(LIBFROG)
 LLDFLAGS = -static
 
-ifeq ($(ENABLE_READLINE),yes)
-LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP)
-CFLAGS += -DENABLE_READLINE
-endif
-
 ifeq ($(ENABLE_EDITLINE),yes)
 LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
 CFLAGS += -DENABLE_EDITLINE
index d01aa74a30d1ad3bae67db2d060f0a7110cb72ef..2a3669183a40ee86b6da04c587d85be5b77d1c4a 100644 (file)
@@ -14,10 +14,6 @@ LLDLIBS = $(LIBXCMD) $(LIBFROG)
 LTDEPENDENCIES = $(LIBXCMD) $(LIBFROG)
 LLDFLAGS = -static
 
-ifeq ($(ENABLE_READLINE),yes)
-LLDLIBS += $(LIBREADLINE) $(LIBTERMCAP)
-endif
-
 ifeq ($(ENABLE_EDITLINE),yes)
 LLDLIBS += $(LIBEDITLINE) $(LIBTERMCAP)
 endif