From nobody Mon Feb 9 19:53:52 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 ARC-Seal: i=1; a=rsa-sha256; t=1560874584; cv=none; d=zoho.com; s=zohoarc; b=dDrkq0z/7OPlDNXqs29iJBAmfJRayc+U4FCluUmstIYd8/bKXhVqqZES09+nUvEYyfW92kdJZDOJYxKOPRI3aYwQUwMhY5J/IMK618oIzehw6g96Bf44CsgTwiVKGOU+yjVsPGcwLLZnnMU2T1aSCyt4WU9w1l62P7lf3ZWoXsc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560874584; 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=zOJmtYcW1xXAuhkXoC5179aHvo3C1HtPboH8g3UZXnQ=; b=P8rv7NapXkuibNs7AmXInaZFbyKkg6hih+5yily7nYjZQc6LWWkLqNyebDD6XlmADXx2tJB1o+YUuSyQQ/uKCAv54+ZuyPVOrL03rBVCaP6CJ22LkNt+mHxCVK4xkFCMoyI9AIs6OtBVlXdKdIOLD2I28FadI/n5N/EijUAi/tw= 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 1560874584820671.7644836489818; Tue, 18 Jun 2019 09:16:24 -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 36AA8307D983; Tue, 18 Jun 2019 16:16:23 +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 115935F9B0; Tue, 18 Jun 2019 16:16:23 +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 C48941806B23; Tue, 18 Jun 2019 16:16:21 +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 x5IGDWtb024289 for ; Tue, 18 Jun 2019 12:13:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id DFA1C84EF; Tue, 18 Jun 2019 16:13:32 +0000 (UTC) Received: from aegolius.redhat.com (ovpn-117-198.phx2.redhat.com [10.3.117.198]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD28860FAB for ; Tue, 18 Jun 2019 16:13:32 +0000 (UTC) From: Jonathon Jongsma To: libvir-list@redhat.com Date: Tue, 18 Jun 2019 11:12:56 -0500 Message-Id: <20190618161316.1722-27-jjongsma@redhat.com> In-Reply-To: <20190618161316.1722-1-jjongsma@redhat.com> References: <20190618161316.1722-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 26/46] util: virprobe.h: use #pragma once in headers 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.48]); Tue, 18 Jun 2019 16:16:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Jonathon Jongsma Reviewed-by: J=C3=A1n Tomko --- src/util/virprobe.h | 63 +++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/src/util/virprobe.h b/src/util/virprobe.h index 5635e58252..80a5f48ec8 100644 --- a/src/util/virprobe.h +++ b/src/util/virprobe.h @@ -19,17 +19,16 @@ * */ =20 -#ifndef LIBVIRT_VIRPROBE_H -# define LIBVIRT_VIRPROBE_H +#pragma once =20 -# include "internal.h" -# include "virlog.h" +#include "internal.h" +#include "virlog.h" =20 -# if WITH_DTRACE_PROBES -# ifndef LIBVIRT_PROBES_H -# define LIBVIRT_PROBES_H -# include "libvirt_probes.h" -# endif /* LIBVIRT_PROBES_H */ +#if WITH_DTRACE_PROBES +# ifndef LIBVIRT_PROBES_H +# define LIBVIRT_PROBES_H +# include "libvirt_probes.h" +# endif /* LIBVIRT_PROBES_H */ =20 /* Systemtap 1.2 headers have a bug where they cannot handle a * variable declared with array type. Work around this by casting all @@ -39,50 +38,50 @@ * hopefully, if we ever add a call to PROBE with other than 9 * end arguments, you can figure out the pattern to extend this hack. */ -# define VIR_COUNT_ARGS(...) VIR_ARG11(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4,= 3, 2, 1) -# define VIR_ARG11(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, ...) _11 -# define VIR_ADD_CAST_EXPAND(a, b, ...) VIR_ADD_CAST_PASTE(a, b, __VA_ARG= S__) -# define VIR_ADD_CAST_PASTE(a, b, ...) a##b(__VA_ARGS__) +# define VIR_COUNT_ARGS(...) VIR_ARG11(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, = 3, 2, 1) +# define VIR_ARG11(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, ...) _11 +# define VIR_ADD_CAST_EXPAND(a, b, ...) VIR_ADD_CAST_PASTE(a, b, __VA_ARGS= __) +# define VIR_ADD_CAST_PASTE(a, b, ...) a##b(__VA_ARGS__) =20 /* The double cast is necessary to silence gcc warnings; any pointer * can safely go to intptr_t and back to void *, which collapses * arrays into pointers; while any integer can be widened to intptr_t * then cast to void *. */ -# define VIR_ADD_CAST(a) ((void *)(intptr_t)(a)) -# define VIR_ADD_CAST1(a) \ +# define VIR_ADD_CAST(a) ((void *)(intptr_t)(a)) +# define VIR_ADD_CAST1(a) \ VIR_ADD_CAST(a) -# define VIR_ADD_CAST2(a, b) \ +# define VIR_ADD_CAST2(a, b) \ VIR_ADD_CAST(a), VIR_ADD_CAST(b) -# define VIR_ADD_CAST3(a, b, c) \ +# define VIR_ADD_CAST3(a, b, c) \ VIR_ADD_CAST(a), VIR_ADD_CAST(b), VIR_ADD_CAST(c) -# define VIR_ADD_CAST4(a, b, c, d) \ +# define VIR_ADD_CAST4(a, b, c, d) \ VIR_ADD_CAST(a), VIR_ADD_CAST(b), VIR_ADD_CAST(c), \ VIR_ADD_CAST(d) -# define VIR_ADD_CAST5(a, b, c, d, e) \ +# define VIR_ADD_CAST5(a, b, c, d, e) \ VIR_ADD_CAST(a), VIR_ADD_CAST(b), VIR_ADD_CAST(c), \ VIR_ADD_CAST(d), VIR_ADD_CAST(e) -# define VIR_ADD_CAST6(a, b, c, d, e, f) \ +# define VIR_ADD_CAST6(a, b, c, d, e, f) \ VIR_ADD_CAST(a), VIR_ADD_CAST(b), VIR_ADD_CAST(c), \ VIR_ADD_CAST(d), VIR_ADD_CAST(e), VIR_ADD_CAST(f) -# define VIR_ADD_CAST7(a, b, c, d, e, f, g) \ +# define VIR_ADD_CAST7(a, b, c, d, e, f, g) \ VIR_ADD_CAST(a), VIR_ADD_CAST(b), VIR_ADD_CAST(c), \ VIR_ADD_CAST(d), VIR_ADD_CAST(e), VIR_ADD_CAST(f), \ VIR_ADD_CAST(g) -# define VIR_ADD_CAST8(a, b, c, d, e, f, g, h) \ +# define VIR_ADD_CAST8(a, b, c, d, e, f, g, h) \ VIR_ADD_CAST(a), VIR_ADD_CAST(b), VIR_ADD_CAST(c), \ VIR_ADD_CAST(d), VIR_ADD_CAST(e), VIR_ADD_CAST(f), \ VIR_ADD_CAST(g), VIR_ADD_CAST(h) -# define VIR_ADD_CAST9(a, b, c, d, e, f, g, h, i) \ +# define VIR_ADD_CAST9(a, b, c, d, e, f, g, h, i) \ VIR_ADD_CAST(a), VIR_ADD_CAST(b), VIR_ADD_CAST(c), \ VIR_ADD_CAST(d), VIR_ADD_CAST(e), VIR_ADD_CAST(f), \ VIR_ADD_CAST(g), VIR_ADD_CAST(h), VIR_ADD_CAST(i) =20 -# define VIR_ADD_CASTS(...) \ +# define VIR_ADD_CASTS(...) \ VIR_ADD_CAST_EXPAND(VIR_ADD_CAST, VIR_COUNT_ARGS(__VA_ARGS__), \ __VA_ARGS__) =20 -# define PROBE_EXPAND(NAME, ARGS) NAME(ARGS) -# define PROBE(NAME, FMT, ...) \ +# define PROBE_EXPAND(NAME, ARGS) NAME(ARGS) +# define PROBE(NAME, FMT, ...) \ VIR_INFO_INT(&virLogSelf, \ __FILE__, __LINE__, __func__, \ #NAME ": " FMT, __VA_ARGS__); \ @@ -91,18 +90,16 @@ VIR_ADD_CASTS(__VA_ARGS__)); \ } =20 -# define PROBE_QUIET(NAME, FMT, ...) \ +# define PROBE_QUIET(NAME, FMT, ...) \ if (LIBVIRT_ ## NAME ## _ENABLED()) { \ PROBE_EXPAND(LIBVIRT_ ## NAME, \ VIR_ADD_CASTS(__VA_ARGS__)); \ } -# else -# define PROBE(NAME, FMT, ...) \ +#else +# define PROBE(NAME, FMT, ...) \ VIR_INFO_INT(&virLogSelf, \ __FILE__, __LINE__, __func__, \ #NAME ": " FMT, __VA_ARGS__); =20 -# define PROBE_QUIET(NAME, FMT, ...) -# endif - -#endif /* LIBVIRT_VIRPROBE_H */ +# define PROBE_QUIET(NAME, FMT, ...) +#endif --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list