From nobody Sat May 4 07:52:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554815551; cv=none; d=zoho.com; s=zohoarc; b=bMmoQkt69m81sBw2O4qidHynSDEM/rVm8IAvj3ldEiiBcGrN/H7PYtQfR61MLOHDC/vT3Lm0aUtbG/S2pKc1GdYNzfpXnaW9VRlCPP5h/q1mBGuG+0zaw6LTM5Hiz0kP9nuL/68xPPsZ8v+zIIx3Rrpa3/4F5qU5HSN/dt/asRc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554815551; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=H/EDLGLjRT962IhwGG1+VWwy6tbNq2ohl9Aiqn4rhrg=; b=n4P9qDLpmPgs+nZysTJb0lP66oU4x2CV17PdVnU5CZwqC2D8nQ5Nh7zNip115L2JrSyUHqWCI5aqBLb2NdBT9K8k9X0nyrkcAArMcxGjdkHnQl7ocqzuDMDxXGB12me+VvqlAcDHG9e4Zfj3yaGxTR2MuuleZzwCEjLsYHNCSOE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155481555193356.45183491890941; Tue, 9 Apr 2019 06:12:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E9CA03005FEF; Tue, 9 Apr 2019 13:12:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B09CB64291; Tue, 9 Apr 2019 13:12:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6E86D3FB12; Tue, 9 Apr 2019 13:12:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39DAS2P005568 for ; Tue, 9 Apr 2019 09:10:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 61CCA1891B; Tue, 9 Apr 2019 13:10:28 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD9F55C28D for ; Tue, 9 Apr 2019 13:10:27 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 15:10:18 +0200 Message-Id: <20190409131023.20275-2-abologna@redhat.com> In-Reply-To: <20190409131023.20275-1-abologna@redhat.com> References: <20190409131023.20275-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/6] tools: vsh: Drop obsolete readline compatibility code X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 09 Apr 2019 13:12:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This code is needed to use readline older than 4.1, but all our target platforms ship with at least 6.0 these days so we can safely get rid of it. Signed-off-by: Andrea Bolognani --- tools/vsh.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 65b96f87d5..f2486498c9 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2945,32 +2945,15 @@ vshReadlineInit(vshControl *ctl) /* Opaque data for autocomplete callbacks. */ autoCompleteOpaque =3D ctl; =20 - /* Allow conditional parsing of the ~/.inputrc file. - * Work around ancient readline 4.1 (hello Mac OS X), - * which declared it as 'char *' instead of 'const char *'. - */ -# if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402 rl_readline_name =3D ctl->name; -# else - rl_readline_name =3D (char *) ctl->name; -# endif =20 /* Tell the completer that we want a crack first. */ rl_attempted_completion_function =3D vshReadlineCompletion; =20 -# if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402 rl_basic_word_break_characters =3D break_characters; -# else - rl_basic_word_break_characters =3D (char *) break_characters; -# endif =20 -# if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402 rl_completer_quote_characters =3D quote_characters; rl_char_is_quoted_p =3D vshReadlineCharIsQuoted; -# else - rl_completer_quote_characters =3D (char *) quote_characters; - rl_char_is_quoted_p =3D (Function *) vshReadlineCharIsQuoted; -# endif =20 if (virAsprintf(&histsize_env, "%s_HISTSIZE", ctl->env_prefix) < 0) goto cleanup; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 07:52:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554815514; cv=none; d=zoho.com; s=zohoarc; b=Rp+uXyK25zdsvZFV60Hik5ieeJ/UPkYFYbtFAQ9BvbCuDe+PoRcZtlJJdf7qyYmo5zm4pBVcf8AYmUnc2QRpLpuc/wWlxU++f3ZOyg5BMu3XE77Ip2pnzpvd0An+vXyEikiAXh/ccviZyab58JBBypKrO1yfGKtlCJ/t4vt3cfA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554815514; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=OMjNG+AOopNqLnRfSpWdfxq6RQOk8j1hsgbbvZnbfxk=; b=VM+SSyxO8nqdHYd609v5p8FgUhKKtXBb+ccNbDdtZJL1DwN+RgO/hShT6mQfhNSURpe60FsztanpII/+TwS3t8M8KSQu5ysHhszLkFvC8frmqgkGx2KAM9n7y56KhbWk0tWxxDzKoGdXZDzAsPsVsm8LaugMfBzmhQr/km/2wts= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554815514403341.28722818751817; Tue, 9 Apr 2019 06:11:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54629307D985; Tue, 9 Apr 2019 13:11:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2DD3169196; Tue, 9 Apr 2019 13:11:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 02199181AC46; Tue, 9 Apr 2019 13:11:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39DATCr005576 for ; Tue, 9 Apr 2019 09:10:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 30C6B1891B; Tue, 9 Apr 2019 13:10:29 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE3835C28D for ; Tue, 9 Apr 2019 13:10:28 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 15:10:19 +0200 Message-Id: <20190409131023.20275-3-abologna@redhat.com> In-Reply-To: <20190409131023.20275-1-abologna@redhat.com> References: <20190409131023.20275-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/6] m4: readline: Extract code setting -D_FUNCTION_DEF X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 09 Apr 2019 13:11:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The current code is a bit awkward, and we're going to need to share it later anyway. We can drop the call to AC_SUBST() while we're at it, since LIBVIRT_CHECK_LIB() already marks READLINE_CFLAGS for substitution. The new code goes to some extra length to avoid setting -D_FUNCTION_DEF twice: this is mostly for cosmetic reasons, and it's necessary because LIBVIRT_CHECK_READLINE() is called twice: once on its own, and then once more as part of LIBVIRT_CHECK_BASH_COMPLETION(). Signed-off-by: Andrea Bolognani --- m4/virt-readline.m4 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index 34b3ff3c4a..ffaeacef75 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -58,10 +58,18 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ # function, to ensure we aren't being confused by caching. LIBS=3D$lv_saved_libs AC_CHECK_LIB([readline], [rl_initialize], - [READLINE_CFLAGS=3D"-D_FUNCTION_DEF $READLINE_CFLAGS" - AC_SUBST(READLINE_CFLAGS)], + [], [READLINE_LIBS=3D"$READLINE_LIBS $extra_LIBS"]) LIBS=3D$lv_saved_libs + + # We need this to avoid compilation issues with modern compilers. + # See 9ea3424a178 for a more detailed explanation + if test "$with_readline" =3D "yes" ; then + case "$READLINE_CFLAGS" in + *-D_FUNCTION_DEF*) ;; + *) READLINE_CFLAGS=3D"-D_FUNCTION_DEF $READLINE_CFLAGS" ;; + esac + fi ]) =20 AC_DEFUN([LIBVIRT_RESULT_READLINE],[ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 07:52:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554815555; cv=none; d=zoho.com; s=zohoarc; b=PmJF8FFEzfFPferExaPRKdNv4RqDpLDB8SsabZnyJsaQEm+PqRua0y5tH/MHyJGy1dSCY4GupkHksgCuAJ+sLc7aBTvymAK7eXYQBifHzE667s4aPraRgBM46xbn5XNwJtZ7SbgD0qb1/tLQkNT9zsKYR4KkMheH9gIDUYKexP8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554815555; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=1ZHatlrFAZqg13YmZCkurKyFlQaSoKyjsDgE6RG3Bh0=; b=Jsdto4yLR7vUV8bnYpwGdKdqtDqXxsJ9ZAk3UaHu7fOShWlkNEQz0dUCi7cd9Qj1nGrKsFBeV8tYE735OwQt2zPJKfRGzaGS+5ok84TOJSfMr18pnV6FAmXhTDJtG1Ewj0BwZbydMnsMsG9YG5EdZy3HQOWX/hIGsVajMMRENXA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15548155556111021.0987176066675; Tue, 9 Apr 2019 06:12:35 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B167BC057E32; Tue, 9 Apr 2019 13:12:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 823F01001E92; Tue, 9 Apr 2019 13:12:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 30EDF3FB15; Tue, 9 Apr 2019 13:12:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39DAU8Y005588 for ; Tue, 9 Apr 2019 09:10:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 02E301891B; Tue, 9 Apr 2019 13:10:30 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7EDD35C28D for ; Tue, 9 Apr 2019 13:10:29 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 15:10:20 +0200 Message-Id: <20190409131023.20275-4-abologna@redhat.com> In-Reply-To: <20190409131023.20275-1-abologna@redhat.com> References: <20190409131023.20275-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/6] m4: readline: Stop looking for rl_completion_quote_character() X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 09 Apr 2019 13:12:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The function was introduced in readline 5.0, and all our target platforms ship with at least 6.0 these days. The check is also used as part of the extra_LIBS machinery, but we're going to drop that too next anyway. Signed-off-by: Andrea Bolognani --- m4/virt-readline.m4 | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index ffaeacef75..09d5d820ea 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -38,19 +38,6 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ LIBS=3D"$lv_saved_libs $extra_LIBS" fi =20 - AC_CHECK_DECLS([rl_completion_quote_character], - [], [], - [[#include - #include ]]) - - if test "$ac_cv_have_decl_rl_completion_quote_character" =3D "no" ; then - if test "$with_readline" =3D "yes" ; then - AC_MSG_ERROR([readline is missing rl_completion_quote_character]) - else - with_readline=3Dno; - fi - fi - # The normal library check... LIBVIRT_CHECK_LIB([READLINE], [readline], [readline], [readline/readline= .h]) =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 07:52:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554815516; cv=none; d=zoho.com; s=zohoarc; b=asijwYJQTWhlrThEeIMdBzSQSDjR7/CK/cYfR3cO2lTpnCrW4SQFkH1qzCPcviSDxezzzCn+0iwyWY2qMXH1S9fXiyWCBHUkITPtbjPHxsm2Ckkx7pc85KL0TeAApTIL2ySXVyWvcpQSugtfag/lxqdag/RnaxUR2/92g2bAeyo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554815516; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ue5PLiy6P1oDDg968OUqGabbbk5m6yqBX/q5OwNsv6k=; b=DSTJnUYKpJ4e87fnlzXEANXp/x2vGjft768RzYZaMIzNVM5XWAasQXHrVT/XgNEu+TSy7e55urbxIwj7TPhyihDMc1tcahmofYvdv9GGKp67zgS4HqBe/T/9USM0Ic/kL3JN8lcwCaCMzSxQ60QvQR6xqQx2WB+oOfydohFPltc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554815516947746.2538190974219; Tue, 9 Apr 2019 06:11:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5969E309264C; Tue, 9 Apr 2019 13:11:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 05FA919731; Tue, 9 Apr 2019 13:11:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8B7A6181AC90; Tue, 9 Apr 2019 13:11:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39DAUfC005593 for ; Tue, 9 Apr 2019 09:10:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id CD1725C28D; Tue, 9 Apr 2019 13:10:30 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 52A8C1891B for ; Tue, 9 Apr 2019 13:10:30 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 15:10:21 +0200 Message-Id: <20190409131023.20275-5-abologna@redhat.com> In-Reply-To: <20190409131023.20275-1-abologna@redhat.com> References: <20190409131023.20275-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/6] m4: readline: Drop extra_LIBS machinery X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 09 Apr 2019 13:11:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The first implementation of this logic was introduced with commit 2ec759fc58f all the way back in 2007; looking at the build logs from our CI environment, however, it's apparent that none of the platforms we currently target are actually using it, so we can assume whatever issue it was working around has been fixed at some point in the last 12 years. Signed-off-by: Andrea Bolognani --- m4/virt-readline.m4 | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index 09d5d820ea..a2788cb4aa 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -22,33 +22,10 @@ AC_DEFUN([LIBVIRT_ARG_READLINE],[ ]) =20 AC_DEFUN([LIBVIRT_CHECK_READLINE],[ - extra_LIBS=3D - lv_saved_libs=3D$LIBS - if test "x$with_readline" !=3D xno; then - # Linking with -lreadline may require some termcap-related code, e.g., - # from one of the following libraries. Add it to LIBS before using - # canned library checks; then verify later if it was needed. - LIBS=3D - AC_SEARCH_LIBS([tgetent], [ncurses curses termcap termlib]) - case $LIBS in - no*) ;; # handle "no" and "none required" - *) # anything else is a -lLIBRARY - extra_LIBS=3D$LIBS ;; - esac - LIBS=3D"$lv_saved_libs $extra_LIBS" - fi =20 # The normal library check... LIBVIRT_CHECK_LIB([READLINE], [readline], [readline], [readline/readline= .h]) =20 - # Touch things up to avoid $extra_LIBS, if possible. Test a second - # function, to ensure we aren't being confused by caching. - LIBS=3D$lv_saved_libs - AC_CHECK_LIB([readline], [rl_initialize], - [], - [READLINE_LIBS=3D"$READLINE_LIBS $extra_LIBS"]) - LIBS=3D$lv_saved_libs - # We need this to avoid compilation issues with modern compilers. # See 9ea3424a178 for a more detailed explanation if test "$with_readline" =3D "yes" ; then --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 07:52:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554815511; cv=none; d=zoho.com; s=zohoarc; b=dMB6/JaBen+dDbYQv82G27CR4N5dJr8WlTMypLo1Jr2OOwA2rtA4rC0zdo5H/pesmuyMKNrNne1Ys9ruCIii+2N6Siot6fsOkzvERAQ8/HJlNYmZH09OqbSOIc3oPfqDyey2CidoHsq6fcIFpAjhF3yNXHLLFzSrN7BzGuTOOBY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554815511; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=sD9Adaa2C5fqp8XKbAbjdn9oly+hE1igA4z97PxW4yE=; b=kds0J3UjVCESsY7srwWcUyiAS87OrFz7jfYWeGqCuliirYhoJVmYd3+YHu3il0hbUckI5cMZpNu7z8VyTcHKMFnsBduM35hc45rEm3BF0Lnkux6nKeZLdES5l9NPH23j8yTWp4Iq1omAK+DkjqHm8/NSNCo/FpuVzqube9Ly9ts= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554815511256409.4920852410694; Tue, 9 Apr 2019 06:11:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 142F7C057F3C; Tue, 9 Apr 2019 13:11:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E147B5C666; Tue, 9 Apr 2019 13:11:41 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 28FD23FB12; Tue, 9 Apr 2019 13:11:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39DAVWg005599 for ; Tue, 9 Apr 2019 09:10:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id A0A5C5C28D; Tue, 9 Apr 2019 13:10:31 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 264385C8BC for ; Tue, 9 Apr 2019 13:10:30 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 15:10:22 +0200 Message-Id: <20190409131023.20275-6-abologna@redhat.com> In-Reply-To: <20190409131023.20275-1-abologna@redhat.com> References: <20190409131023.20275-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/6] m4: readline: Use pkg-config X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 09 Apr 2019 13:11:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" With the 7.0 release, readline has finally started shipping pkg-config support in the form of a readline.pc file. Unfortunately, most downstreams have yet to catch up with this change: among Linux distributions in particular, Fedora Rawhide seems to be the only one installing it at the moment. Non-Linux operating systems have been faring much better in this regard: both FreeBSD (through ports) and macOS (through homebrew) include pkg-config support in their readline package. This is great news for us, since those are the platforms where pkg-config is more useful on account of them installing headers and libraries outside of the respective default search paths. Our implementation checks whether readline is registered as a pkg-config package, and if so obtains CFLAGS and LIBS using the tool; if not, we just keep using the existing logic. Signed-off-by: Andrea Bolognani --- m4/virt-readline.m4 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index a2788cb4aa..6fde47d2c8 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -23,8 +23,17 @@ AC_DEFUN([LIBVIRT_ARG_READLINE],[ =20 AC_DEFUN([LIBVIRT_CHECK_READLINE],[ =20 - # The normal library check... - LIBVIRT_CHECK_LIB([READLINE], [readline], [readline], [readline/readline= .h]) + # We have to check for readline.pc's presence beforehand because for + # the longest time the library didn't ship a .pc file at all + PKG_CHECK_EXISTS([readline], [use_pkgconfig=3D1], [use_pkgconfig=3D0]) + + if test $use_pkgconfig =3D 1; then + # readline 7.0 is the first version which includes pkg-config support + LIBVIRT_CHECK_PKG([READLINE], [readline], [7.0]) + else + # The normal library check... + LIBVIRT_CHECK_LIB([READLINE], [readline], [readline], [readline/readli= ne.h]) + fi =20 # We need this to avoid compilation issues with modern compilers. # See 9ea3424a178 for a more detailed explanation --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 07:52:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1554815516; cv=none; d=zoho.com; s=zohoarc; b=my0WrODKjf61ggTbElJrF6HZD3JqmWlVNuEpjaNjXEhx61bDF/BzxmBNBSgEIZJbBi2oB3mMNt36FFpFXtpkisnJGuobnIa5ahk/KV1qexAOJeHf5gq2FEwEWkfn9kmr6d49+gqEvvUgHjktq8FJf3nP0WToRfFVCdrC2ODk4Xg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554815516; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=EAQKrC4Xq2F9wPMQNYti+la8VlUGOkEJwoN7Oxun3Oo=; b=Hjdcms3OUFHRb0HCBitUOfxoVHFy+dgrlQFrfLuL2EXz6bBxsLAuBBv7sZRs3gqQDgdttwVPl/fHe3x+uXfMMOVGtne0NiApW355FrwUxJ7Ed4s5HC/mbAzw5Pcr0FM7othf4NN/B8PZKWF+lUOGS27296mQP44Y37eSHy0uwKE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554815516922242.61351444742616; Tue, 9 Apr 2019 06:11:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0252D13A5C; Tue, 9 Apr 2019 13:11:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB90D1001E8F; Tue, 9 Apr 2019 13:11:54 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8A4C5181AC8F; Tue, 9 Apr 2019 13:11:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x39DAWlp005612 for ; Tue, 9 Apr 2019 09:10:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6E7195C28D; Tue, 9 Apr 2019 13:10:32 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB7995F9C9 for ; Tue, 9 Apr 2019 13:10:31 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 9 Apr 2019 15:10:23 +0200 Message-Id: <20190409131023.20275-7-abologna@redhat.com> In-Reply-To: <20190409131023.20275-1-abologna@redhat.com> References: <20190409131023.20275-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/6] m4: readline: Add gross kludge for include path X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 09 Apr 2019 13:11:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Unfortunately the data reported by pkg-config is not completely accurate, so until the issue has been fixed in readline we need to work around it in libvirt. The good news is that we only need the fix to land in FreeBSD ports and macOS homebrew before we can drop the kludge, so we're talking months rather than years. Signed-off-by: Andrea Bolognani --- m4/virt-readline.m4 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4 index 6fde47d2c8..0e83b026e0 100644 --- a/m4/virt-readline.m4 +++ b/m4/virt-readline.m4 @@ -43,6 +43,23 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[ *) READLINE_CFLAGS=3D"-D_FUNCTION_DEF $READLINE_CFLAGS" ;; esac fi + + # Gross kludge for readline include path obtained through pkg-config. + # + # As of 8.0, upstream readline.pc has -I${includedir}/readline among + # its Cflags, which is clearly wrong. This does not affect Linux + # because ${includedir} is already part of the default include path, + # but on other platforms that's not the case and the result is that + # can't be located, causing the build to fail. + # A patch solving this issue has already been posted upstream, so once + # the fix has landed in FreeBSD ports and macOS homebrew we can safely + # drop the kludge and rely on pkg-config alone on those platforms. + # + # [1] http://lists.gnu.org/archive/html/bug-readline/2019-04/msg00007.ht= ml + case "$READLINE_CFLAGS" in + *include/readline*) READLINE_CFLAGS=3D$(echo $READLINE_CFLAGS | sed s,= include/readline,include,g) ;; + *) ;; + esac ]) =20 AC_DEFUN([LIBVIRT_RESULT_READLINE],[ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list