[libvirt] [PATCH v2 3/7] m4: readline: Comment rl_completion_quote_character() check

Andrea Bolognani posted 7 patches 6 years, 10 months ago
[libvirt] [PATCH v2 3/7] m4: readline: Comment rl_completion_quote_character() check
Posted by Andrea Bolognani 6 years, 10 months ago
The check was added in 74416b1d4849 without offering any
explanation outside of the commit message. Introduce a comment
to make digging through the git history unnecessary.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 m4/virt-readline.m4 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4
index 4823a27788..649a52edfa 100644
--- a/m4/virt-readline.m4
+++ b/m4/virt-readline.m4
@@ -37,6 +37,12 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[
     LIBS="$lv_saved_libs $extra_LIBS"
   fi
 
+  # This function is present in all reasonable (5.0+) readline versions;
+  # however, the macOS base system contains a library called libedit which
+  # takes over the readline name despite lacking many of its features. We
+  # want to make sure we only enable readline support when linking against
+  # the actual readline library, and the availability of this specific
+  # functions is as good a witness for that fact as any.
   AC_CHECK_DECLS([rl_completion_quote_character],
                  [], [],
                  [[#include <stdio.h>
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 3/7] m4: readline: Comment rl_completion_quote_character() check
Posted by Daniel P. Berrangé 6 years, 10 months ago
On Tue, Apr 09, 2019 at 04:27:46PM +0200, Andrea Bolognani wrote:
> The check was added in 74416b1d4849 without offering any
> explanation outside of the commit message. Introduce a comment
> to make digging through the git history unnecessary.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  m4/virt-readline.m4 | 6 ++++++
>  1 file changed, 6 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list