From nobody Tue Feb 10 16:18:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1653327491; cv=none; d=zohomail.com; s=zohoarc; b=iunl8e9Ta/xN7PDLbpD6WV+Iw6GtN/16H7HsUT7KhNCle6/v7myrFq2glMWDla0M/PetldM9ArFU0HiFtUNg+pHWZkO7iFLWbRPrgV+t1j2pOj/06fnPgu8n4ozFewfKTU3GG6OGlYMx/rG1senJjqaHgMvtUSJifEkAnVnrBlw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653327491; 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; bh=SvI8NjU9KXbhrj0tdndSw0xShc65swhNF5vaFMS14l0=; b=LQokFLPLlDkuHhuxViwUe8/oPxh+M80fNG97kkEDCAZlH7pAROrVlKlwp1FBT1DkK0mR0Vj/okUItwPLlvBxxXF6OiIYfvs2rRt5R4YBOSvXK291snc4yRzUaF2xJnkdatqQfYuWmPagS8wE88yuOh90eBESGWvB+Km1NHwtkBE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 165332749135984.86641960953568; Mon, 23 May 2022 10:38:11 -0700 (PDT) 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-561-5cdRW05AOGKFp3wxF9to9g-1; Mon, 23 May 2022 13:38:03 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 775D31C05EA2; Mon, 23 May 2022 17:38:01 +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 64273492C3B; Mon, 23 May 2022 17:38:01 +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 205BB194705A; Mon, 23 May 2022 17:38:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D614E1947059 for ; Mon, 23 May 2022 17:37:59 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C722D112131E; Mon, 23 May 2022 17:37:59 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.192.104]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 52AE21121320 for ; Mon, 23 May 2022 17:37:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653327490; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SvI8NjU9KXbhrj0tdndSw0xShc65swhNF5vaFMS14l0=; b=bkpjx33ImAHAjIWwWkhAtcHDi5vsWohGwcbTxG3lUJzuNRfu9E2Sjxb7RswgUP7giW8/RE jbyX76cwlt9RPImtm/bzTH6ZAars1veiAdrwxR72yAhraPFtm8cxb1xt0zdU7gN/B223zK 3I0BDjopCD2oi8fOs4cY2me9nKHmQXE= X-MC-Unique: 5cdRW05AOGKFp3wxF9to9g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 04/13] syntax-check: Improve sc_prohibit_config_h_in_headers check Date: Mon, 23 May 2022 19:37:45 +0200 Message-Id: <20220523173754.336735-5-abologna@redhat.com> In-Reply-To: <20220523173754.336735-1-abologna@redhat.com> References: <20220523173754.336735-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 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 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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: 1653327491643100001 Content-Type: text/plain; charset="utf-8" In its current form, the check will not only catch the intended #include but also stuff like #include #include "qemu_interop_config.h" #include The last one is problematic, because it's used in config.h itself. Making the pattern more strict allows us to drop the exception. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 8d30b0e75a..5244d4ee2d 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -694,7 +694,7 @@ sc_prohibit_include_public_headers_brackets: # is only needed in .c files; .h files do not need it since # .c files must include config.h before any other .h. sc_prohibit_config_h_in_headers: - @prohibit=3D'^# *include\>.*config\.h' \ + @prohibit=3D'^# *include *[<"]config\.h' \ in_vc_files=3D'\.h$$' \ halt=3D'headers should not include ' \ $(_sc_search_regexp) @@ -1707,6 +1707,3 @@ exclude_file_name_regexp--sc_prohibit_backslash_align= ment =3D \ =20 exclude_file_name_regexp--sc_prohibit_select =3D \ ^build-aux/syntax-check\.mk|src/util/vireventglibwatch\.c|tests/meson\.b= uild$$ - -exclude_file_name_regexp--sc_prohibit_config_h_in_headers =3D \ - ^config\.h$$ --=20 2.35.3