From nobody Fri Mar 29 14:39:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1678265786; cv=none; d=zohomail.com; s=zohoarc; b=lksEwT/NOw1E2t8DdNlexFhohsST9EQZ6TiL8i/20BvtukMW0BOeEmx3SON4MtkwVPrib0rI+PR/McwmaG+Z/isvDVzHlgueZzyPuA6+j7pekzzXKAF7S3h4R2x8zqpBYq49+lxeJUL3xFmWVckLk1As0hoT0O7DDqwWN1d95xw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678265786; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=KyyGgM6L/cPOMeATEHR4wDjZnzM2YMzXyE4Qnt00Mao=; b=T5Y2h1fbDk+awgzrjUuFtjsdtCSDVj2mjq79eqUpX9IGOfo0qKnRu1CzLpv7432H9iWpMsiRz4lO5KWVnimIWQ47x9rE4Wu4fo9H4pS1MPk+sy8GnYpIX9bNTioyZDL9VwbhkCyp6x+dNeveib4DtTVLhSgca3ZQZolgnOLhtLE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1678265786855401.8962557337795; Wed, 8 Mar 2023 00:56:26 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-472-Q0Vvmp8bPh613_FDqdcOHg-1; Wed, 08 Mar 2023 03:56:22 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5981D1C04198; Wed, 8 Mar 2023 08:56:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5C422166B26; Wed, 8 Mar 2023 08:56:19 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9030019465B2; Wed, 8 Mar 2023 08:56:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D2EB219465B2 for ; Wed, 8 Mar 2023 08:56:17 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 068114024CA1; Wed, 8 Mar 2023 08:56:17 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 864D34035710 for ; Wed, 8 Mar 2023 08:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678265785; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=KyyGgM6L/cPOMeATEHR4wDjZnzM2YMzXyE4Qnt00Mao=; b=fi8ucR+AHIw/zjRUU/qMYNKVtLGDPhYbIRNIKHkBYEMODjpRiHTWdVP4b0vHUfdVVsp/a2 f5T69s3tE8X1jiUyGDi5RFiUQDgYyOM0pifFnXDP+ey3P/vAHTlPBLeA9zrJlpGEoP/q5f 1CI+WXH9mj+LiQiHmInicECBt+znMQo= X-MC-Unique: Q0Vvmp8bPh613_FDqdcOHg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH] rpc: genprotocol: Always apply fixups to rpcgen's output Date: Wed, 8 Mar 2023 09:56:15 +0100 Message-Id: <548ac5242c48636388a70c0696e82ea7a7415272.1678265775.git.pkrempa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678265787570100001 Content-Type: text/plain; charset="utf-8" The platform check which determines when to apply the fixups mentions all officially supported build targets (per docs/platforms.rst) thus it's not really necessary. Additionally while not explicitly written as supported the check does not work properly when building with the MinGW toolchain on Windows as it does not apply the needed transformations. They are necessary there the same way as with MinGW on Linux. https://gitlab.com/libvirt/libvirt/-/issues/453 Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/rpc/genprotocol.pl | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl index f567260588..adf3991d7a 100755 --- a/src/rpc/genprotocol.pl +++ b/src/rpc/genprotocol.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl # -# Generate code for an XDR protocol, optionally applying +# Generate code for an XDR protocol, applying # fixups to the glibc rpcgen code so that it compiles # with warnings turned on. # @@ -47,20 +47,11 @@ open RPCGEN, "-|", "$rpcgen $mode $xdrdef" open TARGET, ">$target" or die "cannot create $target: $!"; -my $fixup =3D $^O eq "linux" || $^O eq "gnukfreebsd" || $^O eq "freebsd" |= | $^O eq "darwin"; - if ($mode eq "-c") { print TARGET "#include \n"; } while () { - # We only want to fixup the GLibc rpcgen output - # So just print data unchanged, if non-Linux - unless ($fixup) { - print TARGET; - next; - } - if (m/^{/) { $in_function =3D 1; print TARGET; --=20 2.39.2