From nobody Sun Feb 8 14:56:53 2026 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554328393187744.8414909727388; Wed, 3 Apr 2019 14:53:13 -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 EAAAE316891B; Wed, 3 Apr 2019 21:53:11 +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 C099F643E7; Wed, 3 Apr 2019 21:53:11 +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 8346D41F3E; Wed, 3 Apr 2019 21:53:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x33Lqv5e013215 for ; Wed, 3 Apr 2019 17:52:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 89E10BA9B; Wed, 3 Apr 2019 21:52:57 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-120-38.rdu2.redhat.com [10.10.120.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0989B6B2D8; Wed, 3 Apr 2019 21:52:55 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 3 Apr 2019 17:52:44 -0400 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/6] build-aux: header-ifdef: Handle #pragma once 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.41]); Wed, 03 Apr 2019 21:53:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" If we see if, skip all remaining header guard checks Signed-off-by: Cole Robinson --- build-aux/header-ifdef.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-aux/header-ifdef.pl b/build-aux/header-ifdef.pl index 297696eb70..401f25fb81 100644 --- a/build-aux/header-ifdef.pl +++ b/build-aux/header-ifdef.pl @@ -32,6 +32,7 @@ my $STATE_GUARD_START =3D 6; my $STATE_GUARD_DEFINE =3D 7; my $STATE_GUARD_END =3D 8; my $STATE_EOF =3D 9; +my $STATE_PRAGMA =3D 10; =20 my $file =3D " "; my $ret =3D 0; @@ -132,6 +133,8 @@ while (<>) { } elsif ($state =3D=3D $STATE_GUARD_START) { if (/^$/) { &mistake("$file: too many blank lines after copyright header"); + } elsif(/#pragma once/) { + $state =3D $STATE_PRAGMA; } elsif (/#ifndef $ifdef$/) { $state =3D $STATE_GUARD_DEFINE; } else { @@ -147,6 +150,8 @@ while (<>) { if (m,#endif /\* $ifdef \*/$,) { $state =3D $STATE_EOF; } + } elsif ($state =3D=3D $STATE_PRAGMA) { + next; } elsif ($state =3D=3D $STATE_EOF) { die "$file: unexpected content after '#endif /* $ifdef */'"; } else { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list