From nobody Fri May 3 08:41:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559672446; cv=none; d=zoho.com; s=zohoarc; b=iF76aOx+7JnYjvRMwkQNEgmZFCvqSz7m2i1mPHpdFEaBTt3ct8PbYKzilJyBBTAs7ohXvAns+SAJS9Xi+Yw34rxMtVfAxb9xDXbyCm5EdBfeohJkKeG9S+/n59A8UtBOgFYkw/FYySDcn/4gxR9ljep7Ak6YUhZMgPjp0B2u3F8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559672446; h=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=Z8sa8nsCfqkIzmsM2loG73+toMFVCy4rxz9ZsCXQWgY=; b=K0wumIM87at9hmsrm9dbGe7WrcC3cunri7QhTJoF57vKnFkGtVRP35wFBy9Abd+P/St9Df1lUqvOB+YlW7NDEFQ44SAbE3Bq0gaUVwWp1xe/LWu2H827sap2CnjTNysdt5hX6v5T35lc8Mw77MW4dLfCqYysY7qmZmE5cZAGdE8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559672446405808.1066369875423; Tue, 4 Jun 2019 11:20:46 -0700 (PDT) Received: from localhost ([127.0.0.1]:56252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYE35-0002aq-CT for importer@patchew.org; Tue, 04 Jun 2019 14:20:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYDyw-00085n-SG for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYDyv-0002wA-2b for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50324) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYDyu-0002vA-R1 for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:21 -0400 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 2AE487E436 for ; Tue, 4 Jun 2019 18:16:20 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-148.ams2.redhat.com [10.36.116.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4E971017E2E for ; Tue, 4 Jun 2019 18:16:19 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 37E9211386A3; Tue, 4 Jun 2019 20:16:18 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2019 20:16:15 +0200 Message-Id: <20190604181618.19980-2-armbru@redhat.com> In-Reply-To: <20190604181618.19980-1-armbru@redhat.com> References: <20190604181618.19980-1-armbru@redhat.com> MIME-Version: 1.0 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.27]); Tue, 04 Jun 2019 18:16:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/4] Normalize position of header guard X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This is the common header guard idiom: /* * File comment */ #ifndef GUARD_SYMBOL_H #define GUARD_SYMBOL_H ... actual contents ... #endif A few of our headers have some #include before the guard. target/tilegx/spr_def_64.h has #ifndef __DOXYGEN__ outside the guard. A few more have the #define elsewhere. Change them to match the common idiom. For spr_def_64.h, that means dropping #ifndef __DOXYGEN__. While there, rename guard symbols to make scripts/clean-header-guards.pl happy. Signed-off-by: Markus Armbruster --- crypto/ivgen-essiv.h | 9 ++++----- crypto/ivgen-plain.h | 5 ++--- crypto/ivgen-plain64.h | 9 ++++----- include/hw/arm/allwinner-a10.h | 4 ++-- include/hw/arm/omap.h | 8 +++++--- include/hw/arm/xlnx-zynqmp.h | 2 +- include/hw/char/cadence_uart.h | 2 +- include/hw/display/xlnx_dp.h | 9 ++++----- include/hw/dma/xlnx-zynq-devcfg.h | 2 +- include/hw/net/cadence_gem.h | 2 +- target/i386/whp-dispatch.h | 7 +++---- target/tilegx/spr_def_64.h | 10 +++------- tests/io-channel-helpers.h | 9 ++++----- 13 files changed, 35 insertions(+), 43 deletions(-) diff --git a/crypto/ivgen-essiv.h b/crypto/ivgen-essiv.h index f34dbab57b..6c35c0b5ab 100644 --- a/crypto/ivgen-essiv.h +++ b/crypto/ivgen-essiv.h @@ -15,14 +15,13 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . - * */ =20 +#ifndef QCRYPTO_IVGEN_ESSIV_H +#define QCRYPTO_IVGEN_ESSIV_H + #include "ivgenpriv.h" =20 -#ifndef QCRYPTO_IVGEN_ESSIV_H__ -#define QCRYPTO_IVGEN_ESSIV_H__ - extern struct QCryptoIVGenDriver qcrypto_ivgen_essiv; =20 -#endif /* QCRYPTO_IVGEN_ESSIV_H__ */ +#endif /* QCRYPTO_IVGEN_ESSIV_H */ diff --git a/crypto/ivgen-plain.h b/crypto/ivgen-plain.h index 16e1ae5b27..395501f693 100644 --- a/crypto/ivgen-plain.h +++ b/crypto/ivgen-plain.h @@ -15,14 +15,13 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . - * */ =20 -#include "ivgenpriv.h" - #ifndef QCRYPTO_IVGEN_PLAIN_H__ #define QCRYPTO_IVGEN_PLAIN_H__ =20 +#include "ivgenpriv.h" + extern struct QCryptoIVGenDriver qcrypto_ivgen_plain; =20 #endif /* QCRYPTO_IVGEN_PLAIN_H__ */ diff --git a/crypto/ivgen-plain64.h b/crypto/ivgen-plain64.h index f8611bd705..0a20fd1fd8 100644 --- a/crypto/ivgen-plain64.h +++ b/crypto/ivgen-plain64.h @@ -15,14 +15,13 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . - * */ =20 +#ifndef QCRYPTO_IVGEN_PLAIN64_H +#define QCRYPTO_IVGEN_PLAIN64_H + #include "ivgenpriv.h" =20 -#ifndef QCRYPTO_IVGEN_PLAIN64_H__ -#define QCRYPTO_IVGEN_PLAIN64_H__ - extern struct QCryptoIVGenDriver qcrypto_ivgen_plain64; =20 -#endif /* QCRYPTO_IVGEN_PLAIN64_H__ */ +#endif /* QCRYPTO_IVGEN_PLAIN64_H */ diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h index 6305b9c586..2c728efe07 100644 --- a/include/hw/arm/allwinner-a10.h +++ b/include/hw/arm/allwinner-a10.h @@ -1,4 +1,5 @@ -#ifndef ALLWINNER_H_ +#ifndef HW_ARM_ALLWINNER_A10_H +#define HW_ARM_ALLWINNER_A10_H =20 #include "qemu-common.h" #include "qemu/error-report.h" @@ -38,5 +39,4 @@ typedef struct AwA10State { MemoryRegion sram_a; } AwA10State; =20 -#define ALLWINNER_H_ #endif diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index 9de867daa4..d21e418242 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -16,9 +16,11 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, see . */ -#ifndef hw_omap_h + +#ifndef HW_ARM_OMAP_H +#define HW_ARM_OMAP_H + #include "exec/memory.h" -# define hw_omap_h "omap.h" #include "hw/irq.h" #include "hw/input/tsc2xxx.h" #include "target/arm/cpu-qom.h" @@ -991,4 +993,4 @@ enum { =20 # define OMAP_MPUI_REG_MASK 0x000007ff =20 -#endif /* hw_omap_h */ +#endif diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h index cd90b04310..604aabfdc6 100644 --- a/include/hw/arm/xlnx-zynqmp.h +++ b/include/hw/arm/xlnx-zynqmp.h @@ -16,6 +16,7 @@ */ =20 #ifndef XLNX_ZYNQMP_H +#define XLNX_ZYNQMP_H =20 #include "qemu-common.h" #include "hw/arm/boot.h" @@ -114,5 +115,4 @@ typedef struct XlnxZynqMPState { bool has_rpu; } XlnxZynqMPState; =20 -#define XLNX_ZYNQMP_H #endif diff --git a/include/hw/char/cadence_uart.h b/include/hw/char/cadence_uart.h index 118e3f10de..e1cf33e94c 100644 --- a/include/hw/char/cadence_uart.h +++ b/include/hw/char/cadence_uart.h @@ -17,6 +17,7 @@ */ =20 #ifndef CADENCE_UART_H +#define CADENCE_UART_H =20 #include "hw/sysbus.h" #include "chardev/char-fe.h" @@ -66,5 +67,4 @@ static inline DeviceState *cadence_uart_create(hwaddr add= r, return dev; } =20 -#define CADENCE_UART_H #endif diff --git a/include/hw/display/xlnx_dp.h b/include/hw/display/xlnx_dp.h index 45a805033a..ab0dd250cc 100644 --- a/include/hw/display/xlnx_dp.h +++ b/include/hw/display/xlnx_dp.h @@ -19,9 +19,11 @@ * * You should have received a copy of the GNU General Public License along * with this program; if not, see . - * */ =20 +#ifndef XLNX_DP_H +#define XLNX_DP_H + #include "hw/sysbus.h" #include "ui/console.h" #include "hw/misc/auxbus.h" @@ -33,9 +35,6 @@ #include "hw/dma/xlnx_dpdma.h" #include "audio/audio.h" =20 -#ifndef XLNX_DP_H -#define XLNX_DP_H - #define AUD_CHBUF_MAX_DEPTH (32 * KiB) #define MAX_QEMU_BUFFER_SIZE (4 * KiB) =20 @@ -107,4 +106,4 @@ typedef struct XlnxDPState { #define TYPE_XLNX_DP "xlnx.v-dp" #define XLNX_DP(obj) OBJECT_CHECK(XlnxDPState, (obj), TYPE_XLNX_DP) =20 -#endif /* !XLNX_DP_H */ +#endif diff --git a/include/hw/dma/xlnx-zynq-devcfg.h b/include/hw/dma/xlnx-zynq-d= evcfg.h index 9f5119a89a..1d3969d91f 100644 --- a/include/hw/dma/xlnx-zynq-devcfg.h +++ b/include/hw/dma/xlnx-zynq-devcfg.h @@ -25,6 +25,7 @@ */ =20 #ifndef XLNX_ZYNQ_DEVCFG_H +#define XLNX_ZYNQ_DEVCFG_H =20 #include "hw/register.h" #include "hw/sysbus.h" @@ -58,5 +59,4 @@ typedef struct XlnxZynqDevcfg { RegisterInfo regs_info[XLNX_ZYNQ_DEVCFG_R_MAX]; } XlnxZynqDevcfg; =20 -#define XLNX_ZYNQ_DEVCFG_H #endif diff --git a/include/hw/net/cadence_gem.h b/include/hw/net/cadence_gem.h index 5426961d91..5c83036ade 100644 --- a/include/hw/net/cadence_gem.h +++ b/include/hw/net/cadence_gem.h @@ -23,6 +23,7 @@ */ =20 #ifndef CADENCE_GEM_H +#define CADENCE_GEM_H =20 #define TYPE_CADENCE_GEM "cadence_gem" #define CADENCE_GEM(obj) OBJECT_CHECK(CadenceGEMState, (obj), TYPE_CADENCE= _GEM) @@ -84,5 +85,4 @@ typedef struct CadenceGEMState { bool sar_active[4]; } CadenceGEMState; =20 -#define CADENCE_GEM_H #endif diff --git a/target/i386/whp-dispatch.h b/target/i386/whp-dispatch.h index a23fb33a29..23791fbb47 100644 --- a/target/i386/whp-dispatch.h +++ b/target/i386/whp-dispatch.h @@ -1,12 +1,11 @@ +#ifndef WHP_DISPATCH_H +#define WHP_DISPATCH_H + #include =20 #include #include =20 -#ifndef WHP_DISPATCH_H -#define WHP_DISPATCH_H - - #define LIST_WINHVPLATFORM_FUNCTIONS(X) \ X(HRESULT, WHvGetCapability, (WHV_CAPABILITY_CODE CapabilityCode, VOID* = CapabilityBuffer, UINT32 CapabilityBufferSizeInBytes, UINT32* WrittenSizeIn= Bytes)) \ X(HRESULT, WHvCreatePartition, (WHV_PARTITION_HANDLE* Partition)) \ diff --git a/target/tilegx/spr_def_64.h b/target/tilegx/spr_def_64.h index 67a6c1751e..d3c0cc26d8 100644 --- a/target/tilegx/spr_def_64.h +++ b/target/tilegx/spr_def_64.h @@ -12,10 +12,8 @@ * more details. */ =20 -#ifndef __DOXYGEN__ - -#ifndef __ARCH_SPR_DEF_64_H__ -#define __ARCH_SPR_DEF_64_H__ +#ifndef ARCH_SPR_DEF_64_H +#define ARCH_SPR_DEF_64_H =20 #define SPR_AUX_PERF_COUNT_0 0x2105 #define SPR_AUX_PERF_COUNT_1 0x2106 @@ -211,6 +209,4 @@ #define SPR_WATCH_MASK 0x200a #define SPR_WATCH_VAL 0x200b =20 -#endif /* !defined(__ARCH_SPR_DEF_64_H__) */ - -#endif /* !defined(__DOXYGEN__) */ +#endif diff --git a/tests/io-channel-helpers.h b/tests/io-channel-helpers.h index fedc64fd5a..bb2de6fbb9 100644 --- a/tests/io-channel-helpers.h +++ b/tests/io-channel-helpers.h @@ -15,14 +15,13 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . - * */ =20 +#ifndef TEST_IO_CHANNEL_HELPERS_H +#define TEST_IO_CHANNEL_HELPERS_H + #include "io/channel.h" =20 -#ifndef TEST_IO_CHANNEL_HELPERS -#define TEST_IO_CHANNEL_HELPERS - typedef struct QIOChannelTest QIOChannelTest; =20 QIOChannelTest *qio_channel_test_new(void); @@ -39,4 +38,4 @@ void qio_channel_test_run_reader(QIOChannelTest *test, =20 void qio_channel_test_validate(QIOChannelTest *test); =20 -#endif /* TEST_IO_CHANNEL_HELPERS */ +#endif /* TEST_IO_CHANNEL_HELPERS_H */ --=20 2.21.0 From nobody Fri May 3 08:41:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559672341; cv=none; d=zoho.com; s=zohoarc; b=kl2aKjE74ZU5U4MVCcYFhH4rrXPGROZ9S0n9xfuoFyk0bUQWFIoKqL+gMLGkKiJxCX6v0e2FKiVwUI3lMXq1FRPfErOaQ5jp6pa/704hkQktc83Q9NA5vMXDhf8MHX+Q1IFVmxISIrUJmu+iq9rlGc52Ez9N4VfZB3erT/T2lCQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559672341; h=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=/0FpXgId27D/GWhTcj45GCcZn2b81TNQrOSXcXa4IjI=; b=SjRRlbg5VrYNLy0UMreGTa6Y/BvDK5qrCKTbQFsA7v8VKY88vehpzv6TWw92TbYtP6m0ih9MqTTd0Q7HKpkU68gxMoo8XsbkVFpXvbuM8Lw690mjU4nnfHpZYS3oIHU4OfS0PEOwkQI2P8JWg8jYxeL7gvDTFq0A+Yqs9y/4/iU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559672341260137.63022968024381; Tue, 4 Jun 2019 11:19:01 -0700 (PDT) Received: from localhost ([127.0.0.1]:56198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYE0r-0000gq-48 for importer@patchew.org; Tue, 04 Jun 2019 14:18:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYDyv-00085c-RZ for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYDyu-0002vq-Rg for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50318) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYDyu-0002v2-LP for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:20 -0400 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 0175B83F51 for ; Tue, 4 Jun 2019 18:16:20 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-148.ams2.redhat.com [10.36.116.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C510F1798A for ; Tue, 4 Jun 2019 18:16:19 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 3A5A111386A6; Tue, 4 Jun 2019 20:16:18 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2019 20:16:16 +0200 Message-Id: <20190604181618.19980-3-armbru@redhat.com> In-Reply-To: <20190604181618.19980-1-armbru@redhat.com> References: <20190604181618.19980-1-armbru@redhat.com> MIME-Version: 1.0 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.27]); Tue, 04 Jun 2019 18:16:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/4] scripts/clean-header-guards: Fix handling of trailing comments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" clean-header-guards.pl fails to recognize a header guard #endif when it's followed by a // comment, or multiple comments. Fix that. Signed-off-by: Markus Armbruster --- scripts/clean-header-guards.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/clean-header-guards.pl b/scripts/clean-header-guards.pl index 5e67f1998c..f47d673ad5 100755 --- a/scripts/clean-header-guards.pl +++ b/scripts/clean-header-guards.pl @@ -103,7 +103,7 @@ sub preprocess { for my $fname (@ARGV) { my $text =3D slurp($fname); =20 - $text =3D~ m,\A(\s*\n|\s*//\N*\n|\s*/\*.*?\*/\s*\n)*|,msg; + $text =3D~ m,\A(\s*\n|\s*//\N*\n|\s*/\*.*?\*/\s*\n)*|,sg; my $pre =3D $&; unless ($text =3D~ /\G(.*\n)/g) { $text =3D~ /\G.*/; @@ -137,14 +137,16 @@ for my $fname (@ARGV) { } =20 unless ($body =3D~ m,\A((.*\n)*) - (\s*\#\s*endif\s*(/\*\s*.*\s*\*/\s*)?\n?) - (\n|\s)*\Z,x) { + ([ \t]*\#[ \t]*endif([ \t]*\N*)\n) + ((?s)(\s*\n|\s*//\N*\n|\s*/\*.*?\*/\s*\n)*) + \Z,x) { skipping($fname, "can't find end of header guard"); next; } $body =3D $1; my $line3 =3D $3; my $endif_comment =3D $4; + my $post =3D $5; =20 my $oldg =3D $guard; =20 @@ -186,14 +188,14 @@ for my $fname (@ARGV) { my $newl1 =3D "#ifndef $guard\n"; my $newl2 =3D "#define $guard\n"; my $newl3 =3D "#endif\n"; - $newl3 =3D~ s,\Z, /* $guard */, if defined $endif_comment; + $newl3 =3D~ s,\Z, /* $guard */, if $endif_comment; if ($line1 ne $newl1 or $line2 ne $newl2 or $line3 ne $newl3) { $pre =3D~ s/\n*\Z/\n\n/ if $pre =3D~ /\N/; $body =3D~ s/\A\n*/\n/; if ($opt_n) { print "$fname would be cleaned up\n" if $opt_v; } else { - unslurp($fname, "$pre$newl1$newl2$body$newl3"); + unslurp($fname, "$pre$newl1$newl2$body$newl3$post"); print "$fname cleaned up\n" if $opt_v; } } --=20 2.21.0 From nobody Fri May 3 08:41:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559672323; cv=none; d=zoho.com; s=zohoarc; b=aNOVGhnlzaCHYmGCRsDzopmkPM64586DY6rtTBX4ox2nfEtczTV7NobqZBZTK5SfqqPn4R9tk5AdMbuZki2+zskr/JwXgbBOs/+n1IamCtdl3I+PSMHCNF99ETzso02fyenhx/12snnn5YRnaB2jQXoQh3UsFO2FDn1j9bp9wKk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559672323; h=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=ZaRGfdL8xepextyh5REsO4b+/lxDBoZWphishXUkbiE=; b=RmYWymKhHRXTyQ/5AsR18hOxn/zi11+9Suqsuhj2Sjz96nXLSsYregaNS7/nSyTtL39TGSTRTZlwL0v5v6hlshfFvY/5m+f7CJyVKODtpKF0fk/Sz348q6fLSDwiSzOKAftFojnRdldyksDT3N2LdaacJ794ahO8qLwZvg9d30Q= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559672323555710.5467424988943; Tue, 4 Jun 2019 11:18:43 -0700 (PDT) Received: from localhost ([127.0.0.1]:56202 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYE11-0000r8-Ow for importer@patchew.org; Tue, 04 Jun 2019 14:18:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYDz1-00089X-CN for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYDz0-000317-25 for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57044) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYDyz-00030d-Qk for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:26 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2A7572F8BDE for ; Tue, 4 Jun 2019 18:16:20 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-148.ams2.redhat.com [10.36.116.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4E225B68D for ; Tue, 4 Jun 2019 18:16:19 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 3DE3511386A7; Tue, 4 Jun 2019 20:16:18 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2019 20:16:17 +0200 Message-Id: <20190604181618.19980-4-armbru@redhat.com> In-Reply-To: <20190604181618.19980-1-armbru@redhat.com> References: <20190604181618.19980-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 04 Jun 2019 18:16:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/4] Clean up a few header guard symbols X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Commit 58ea30f5145 "Clean up header guards that don't match their file name" messed up contrib/elf2dmp/qemu_elf.h and tests/migration/migration-test.h. It missed target/cris/opcode-cris.h and tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h due to the scripts/clean-header-guards.pl bug fixed in the previous commit. Commit a8b991b52dc "Clean up ill-advised or unusual header guards" missed include/hw/xen/io/ring.h for the same reason. Commit 3979fca4b69 "disas: Rename include/disas/bfd.h back to include/disas/dis-asm.h" neglected to update the guard symbol for the rename. Commit a331c6d7741 "semihosting: implement a semihosting console" created include/hw/semihosting/console.h with an ill-advised guard symbol. Clean them up. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- contrib/elf2dmp/qemu_elf.h | 5 ++--- include/disas/dis-asm.h | 6 +++--- include/hw/semihosting/console.h | 6 +++--- include/hw/xen/io/ring.h | 6 +++--- target/cris/opcode-cris.h | 6 +++--- tests/migration/migration-test.h | 2 +- .../UefiTestToolsPkg/Include/Guid/BiosTablesTest.h | 6 +++--- 7 files changed, 18 insertions(+), 19 deletions(-) diff --git a/contrib/elf2dmp/qemu_elf.h b/contrib/elf2dmp/qemu_elf.h index 66ee1f0ed5..b2f0d9cbc9 100644 --- a/contrib/elf2dmp/qemu_elf.h +++ b/contrib/elf2dmp/qemu_elf.h @@ -2,11 +2,10 @@ * Copyright (c) 2018 Virtuozzo International GmbH * * This work is licensed under the terms of the GNU GPL, version 2 or late= r. - * */ =20 -#ifndef EMPF2DMP_QEMU_ELF_H -#define EMPF2DMP_QEMU_ELF_H +#ifndef ELF2DMP_QEMU_ELF_H +#define ELF2DMP_QEMU_ELF_H =20 #include "elf.h" =20 diff --git a/include/disas/dis-asm.h b/include/disas/dis-asm.h index 9240ec32c2..e9c7dd8eb4 100644 --- a/include/disas/dis-asm.h +++ b/include/disas/dis-asm.h @@ -6,8 +6,8 @@ interface, for making instruction-processing programs more independent of the instruction set being processed. */ =20 -#ifndef DISAS_BFD_H -#define DISAS_BFD_H +#ifndef DISAS_DIS_ASM_H +#define DISAS_DIS_ASM_H =20 typedef void *PTR; typedef uint64_t bfd_vma; @@ -508,4 +508,4 @@ bfd_vma bfd_getl16 (const bfd_byte *addr); bfd_vma bfd_getb16 (const bfd_byte *addr); typedef bool bfd_boolean; =20 -#endif /* DISAS_BFD_H */ +#endif /* DISAS_DIS_ASM_H */ diff --git a/include/hw/semihosting/console.h b/include/hw/semihosting/cons= ole.h index 30e66ae20a..9eb45b7c53 100644 --- a/include/hw/semihosting/console.h +++ b/include/hw/semihosting/console.h @@ -6,8 +6,8 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ =20 -#ifndef _SEMIHOST_CONSOLE_H_ -#define _SEMIHOST_CONSOLE_H_ +#ifndef SEMIHOST_CONSOLE_H +#define SEMIHOST_CONSOLE_H =20 /** * qemu_semihosting_console_out: @@ -35,4 +35,4 @@ int qemu_semihosting_console_out(CPUArchState *env, targe= t_ulong s, int len); */ int qemu_semihosting_log_out(const char *s, int len); =20 -#endif /* _SEMIHOST_CONSOLE_H_ */ +#endif /* SEMIHOST_CONSOLE_H */ diff --git a/include/hw/xen/io/ring.h b/include/hw/xen/io/ring.h index 1adacf09f9..62abfd7a6e 100644 --- a/include/hw/xen/io/ring.h +++ b/include/hw/xen/io/ring.h @@ -24,8 +24,8 @@ * Tim Deegan and Andrew Warfield November 2004. */ =20 -#ifndef __XEN_PUBLIC_IO_RING_H__ -#define __XEN_PUBLIC_IO_RING_H__ +#ifndef XEN_PUBLIC_IO_RING_H +#define XEN_PUBLIC_IO_RING_H =20 /* * When #include'ing this header, you need to provide the following @@ -469,7 +469,7 @@ struct name##_data_intf { = \ }; = \ DEFINE_XEN_FLEX_RING(name) =20 -#endif /* __XEN_PUBLIC_IO_RING_H__ */ +#endif /* XEN_PUBLIC_IO_RING_H */ =20 /* * Local variables: diff --git a/target/cris/opcode-cris.h b/target/cris/opcode-cris.h index e7ebb98cd0..40509c88db 100644 --- a/target/cris/opcode-cris.h +++ b/target/cris/opcode-cris.h @@ -19,8 +19,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see . */ =20 -#ifndef __CRIS_H_INCLUDED_ -#define __CRIS_H_INCLUDED_ +#ifndef TARGET_CRIS_OPCODE_CRIS_H +#define TARGET_CRIS_OPCODE_CRIS_H =20 #if !defined(__STDC__) && !defined(const) #define const @@ -345,7 +345,7 @@ extern const struct cris_opcode cris_opcodes[]; sign-extended before adding to "target". */ #define CRIS_DIS_FLAG_MEM_TARGET2_MEM_WORD (1 << 7) =20 -#endif /* __CRIS_H_INCLUDED_ */ +#endif /* TARGET_CRIS_OPCODE_CRIS_H */ =20 /* * Local variables: diff --git a/tests/migration/migration-test.h b/tests/migration/migration-t= est.h index aa3c3a9625..68512c0b1b 100644 --- a/tests/migration/migration-test.h +++ b/tests/migration/migration-test.h @@ -32,4 +32,4 @@ */ #define ARM_TEST_MAX_KERNEL_SIZE (512 * 1024) =20 -#endif /* _MIGRATION_TEST_H */ +#endif /* MIGRATION_TEST_H */ diff --git a/tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTables= Test.h b/tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest= .h index 7a74c121d5..07808787cc 100644 --- a/tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h +++ b/tests/uefi-test-tools/UefiTestToolsPkg/Include/Guid/BiosTablesTest.h @@ -21,8 +21,8 @@ WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ =20 -#ifndef __BIOS_TABLES_TEST_H__ -#define __BIOS_TABLES_TEST_H__ +#ifndef BIOSTABLESTEST_H +#define BIOSTABLESTEST_H =20 #include =20 @@ -77,4 +77,4 @@ typedef struct { } BIOS_TABLES_TEST; #pragma pack () =20 -#endif // __BIOS_TABLES_TEST_H__ +#endif /* BIOSTABLESTEST_H */ --=20 2.21.0 From nobody Fri May 3 08:41:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559672334; cv=none; d=zoho.com; s=zohoarc; b=UqOqFLRBbWlS0ENj5DeAe03O2F/aXLt0DpQu7qJniqjdXejEWGuwVECcw4iyNw4ZR6yPOLuKXry4VZeTDaVF9rIVOtMeGgZ4MF29CcFL8+ZDFfZyR2gKeAm3CZaAV416iziQM/li7dp9IZ8+wAdXIs3Afmdr1oH9CMb5fr0Kafo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559672334; h=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=f5fqIMDyOFNlldaWJMDbzK9d2GiGzKe6fX7OxLl5geI=; b=O7UhLHHO2f1Tgt54sBTgyVjn+y5f9HoH+xuO0/427j5XbIotiT8dWA2fcVTw3Z5uXVZpfMsmivTSLWQpsOC+lkJc1BsXP9uhsvCKSaRu/8cI15joYxEL2mEN4zAHWSBasRyMKAAq23aJErj9YYXT9M+Jl+yc03CWulTVdLZRMmU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1559672334108210.46255497859477; Tue, 4 Jun 2019 11:18:54 -0700 (PDT) Received: from localhost ([127.0.0.1]:56204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYE1H-00010N-W9 for importer@patchew.org; Tue, 04 Jun 2019 14:18:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYDz0-00088z-Jg for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hYDyv-0002wd-K4 for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47710) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hYDyv-0002vi-8U for qemu-devel@nongnu.org; Tue, 04 Jun 2019 14:16:21 -0400 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 98468C04FFF1 for ; Tue, 4 Jun 2019 18:16:20 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-148.ams2.redhat.com [10.36.116.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4F1B5C224 for ; Tue, 4 Jun 2019 18:16:19 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 41CBF11386B0; Tue, 4 Jun 2019 20:16:18 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2019 20:16:18 +0200 Message-Id: <20190604181618.19980-5-armbru@redhat.com> In-Reply-To: <20190604181618.19980-1-armbru@redhat.com> References: <20190604181618.19980-1-armbru@redhat.com> MIME-Version: 1.0 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.31]); Tue, 04 Jun 2019 18:16:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 4/4] Supply missing header guards X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Signed-off-by: Markus Armbruster --- hw/9pfs/xen-9pfs.h | 6 +++++- hw/hppa/hppa_hardware.h | 5 +++++ hw/input/adb-internal.h | 4 ++++ hw/net/e1000e_core.h | 5 +++++ hw/net/e1000x_common.h | 5 +++++ hw/net/vmxnet3_defs.h | 6 +++++- hw/usb/hcd-xhci.h | 5 +++++ hw/usb/quirks.h | 5 +++++ include/fpu/softfloat-macros.h | 5 +++++ include/hw/arm/raspi_platform.h | 5 +++++ include/hw/kvm/clock.h | 6 +++++- include/hw/m68k/mcf_fec.h | 5 +++++ include/hw/mips/bios.h | 5 +++++ include/hw/pci-bridge/simba.h | 5 +++++ include/hw/pci/pci_regs.h | 5 +++++ include/hw/qdev-dma.h | 6 ++++++ include/hw/sparc/sparc64.h | 4 ++++ include/hw/timer/xlnx-zynqmp-rtc.h | 5 +++++ include/ui/spice-display.h | 5 +++++ linux-user/aarch64/syscall_nr.h | 4 ++++ linux-user/aarch64/termbits.h | 5 +++++ linux-user/alpha/syscall_nr.h | 5 +++++ linux-user/alpha/termbits.h | 5 +++++ linux-user/arm/syscall_nr.h | 5 +++++ linux-user/arm/termbits.h | 5 +++++ linux-user/cris/syscall_nr.h | 5 +++++ linux-user/cris/termbits.h | 5 +++++ linux-user/errno_defs.h | 6 ++++++ linux-user/flat.h | 5 +++++ linux-user/hppa/sockbits.h | 5 +++++ linux-user/hppa/syscall_nr.h | 5 +++++ linux-user/hppa/termbits.h | 5 +++++ linux-user/i386/syscall_nr.h | 5 +++++ linux-user/i386/termbits.h | 5 +++++ linux-user/m68k/syscall_nr.h | 5 +++++ linux-user/m68k/termbits.h | 5 +++++ linux-user/microblaze/syscall_nr.h | 5 +++++ linux-user/microblaze/termbits.h | 5 +++++ linux-user/mips/syscall_nr.h | 6 ++++++ linux-user/mips/termbits.h | 5 +++++ linux-user/mips64/syscall_nr.h | 5 +++++ linux-user/nios2/syscall_nr.h | 5 +++++ linux-user/nios2/termbits.h | 5 +++++ linux-user/openrisc/syscall_nr.h | 5 +++++ linux-user/openrisc/termbits.h | 5 +++++ linux-user/ppc/syscall_nr.h | 6 ++++++ linux-user/ppc/termbits.h | 5 +++++ linux-user/riscv/syscall_nr.h | 5 +++++ linux-user/riscv/target_syscall.h | 5 +++++ linux-user/riscv/termbits.h | 5 +++++ linux-user/s390x/syscall_nr.h | 5 +++++ linux-user/s390x/termbits.h | 4 ++++ linux-user/sh4/syscall_nr.h | 5 +++++ linux-user/sh4/termbits.h | 5 +++++ linux-user/socket.h | 5 +++++ linux-user/sparc/syscall_nr.h | 5 +++++ linux-user/sparc/termbits.h | 5 +++++ linux-user/sparc64/syscall_nr.h | 5 +++++ linux-user/sparc64/termbits.h | 5 +++++ linux-user/target_flat.h | 6 ++++++ linux-user/x86_64/syscall_nr.h | 5 +++++ linux-user/x86_64/termbits.h | 5 +++++ linux-user/xtensa/target_flat.h | 8 +++++--- target/cris/crisv10-decode.h | 4 ++++ target/cris/mmu.h | 5 +++++ target/microblaze/microblaze-decode.h | 4 ++++ target/microblaze/mmu.h | 5 +++++ target/moxie/mmu.h | 5 +++++ target/riscv/cpu_bits.h | 5 +++++ target/riscv/cpu_user.h | 5 +++++ target/riscv/instmap.h | 5 +++++ target/tricore/tricore-opcodes.h | 5 +++++ tcg/tcg-gvec-desc.h | 5 +++++ tcg/tcg-op-gvec.h | 5 +++++ tests/crypto-tls-psk-helpers.h | 5 +++++ tests/crypto-tls-x509-helpers.h | 5 +++++ tests/libqos/virtio-9p.h | 5 +++++ tests/libqos/virtio-balloon.h | 5 +++++ tests/libqos/virtio-blk.h | 5 +++++ tests/libqos/virtio-net.h | 5 +++++ tests/libqos/virtio-rng.h | 5 +++++ tests/libqos/virtio-scsi.h | 5 +++++ tests/libqos/virtio-serial.h | 5 +++++ tests/socket-helpers.h | 6 +++++- 84 files changed, 419 insertions(+), 7 deletions(-) diff --git a/hw/9pfs/xen-9pfs.h b/hw/9pfs/xen-9pfs.h index 2d6ef7828c..fbdee3d843 100644 --- a/hw/9pfs/xen-9pfs.h +++ b/hw/9pfs/xen-9pfs.h @@ -8,9 +8,11 @@ * * This work is licensed under the terms of the GNU GPL version 2 or * later. See the COPYING file in the top-level directory. - * */ =20 +#ifndef HW_9PFS_XEN_9PFS_H +#define HW_9PFS_XEN_9PFS_H + #include #include "hw/xen/io/ring.h" =20 @@ -19,3 +21,5 @@ * inline functions in c files. */ DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); + +#endif diff --git a/hw/hppa/hppa_hardware.h b/hw/hppa/hppa_hardware.h index af2f5ee2bd..507f91e05d 100644 --- a/hw/hppa/hppa_hardware.h +++ b/hw/hppa/hppa_hardware.h @@ -1,5 +1,8 @@ /* HPPA cores and system support chips. */ =20 +#ifndef HW_HPPA_HPPA_HARDWARE_H +#define HW_HPPA_HPPA_HARDWARE_H + #define FIRMWARE_START 0xf0000000 #define FIRMWARE_END 0xf0800000 =20 @@ -38,3 +41,5 @@ =20 #define HPPA_MAX_CPUS 8 /* max. number of SMP CPUs */ #define CPU_CLOCK_MHZ 250 /* emulate a 250 MHz CPU */ + +#endif diff --git a/hw/input/adb-internal.h b/hw/input/adb-internal.h index 2a779b8a0a..8d92165c46 100644 --- a/hw/input/adb-internal.h +++ b/hw/input/adb-internal.h @@ -22,6 +22,9 @@ * THE SOFTWARE. */ =20 +#ifndef HW_INPUT_ADB_INTERNAL_H +#define HW_INPUT_ADB_INTERNAL_H + /* ADB commands */ =20 #define ADB_BUSRESET 0x00 @@ -47,3 +50,4 @@ =20 extern const VMStateDescription vmstate_adb_device; =20 +#endif diff --git a/hw/net/e1000e_core.h b/hw/net/e1000e_core.h index 63a15510cc..49abb136dd 100644 --- a/hw/net/e1000e_core.h +++ b/hw/net/e1000e_core.h @@ -33,6 +33,9 @@ * License along with this library; if not, see . */ =20 +#ifndef HW_NET_E1000E_CORE_H +#define HW_NET_E1000E_CORE_H + #define E1000E_PHY_PAGE_SIZE (0x20) #define E1000E_PHY_PAGES (0x07) #define E1000E_MAC_SIZE (0x8000) @@ -151,3 +154,5 @@ e1000e_receive_iov(E1000ECore *core, const struct iovec= *iov, int iovcnt); =20 void e1000e_start_recv(E1000ECore *core); + +#endif diff --git a/hw/net/e1000x_common.h b/hw/net/e1000x_common.h index 0268884e72..19c56f409f 100644 --- a/hw/net/e1000x_common.h +++ b/hw/net/e1000x_common.h @@ -22,6 +22,9 @@ * License along with this library; if not, see . */ =20 +#ifndef HW_NET_E1000X_COMMON_H +#define HW_NET_E1000X_COMMON_H + #include "e1000_regs.h" =20 #define defreg(x) x =3D (E1000_##x >> 2) @@ -209,3 +212,5 @@ typedef struct e1000x_txd_props { =20 void e1000x_read_tx_ctx_descr(struct e1000_context_desc *d, e1000x_txd_props *props); + +#endif diff --git a/hw/net/vmxnet3_defs.h b/hw/net/vmxnet3_defs.h index 6c19d29b12..65780c576d 100644 --- a/hw/net/vmxnet3_defs.h +++ b/hw/net/vmxnet3_defs.h @@ -12,9 +12,11 @@ * * This work is licensed under the terms of the GNU GPL, version 2. * See the COPYING file in the top-level directory. - * */ =20 +#ifndef HW_NET_VMXNET3_DEFS_H +#define HW_NET_VMXNET3_DEFS_H + #include "net/net.h" #include "hw/net/vmxnet3.h" =20 @@ -131,3 +133,5 @@ typedef struct { /* Compatibility flags for migration */ uint32_t compat_flags; } VMXNET3State; + +#endif diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 240caa4e51..2fad4df2a7 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -19,6 +19,9 @@ * License along with this library; if not, see . */ =20 +#ifndef HW_USB_HCD_XHCI_H +#define HW_USB_HCD_XHCI_H + #define TYPE_XHCI "base-xhci" #define TYPE_NEC_XHCI "nec-usb-xhci" #define TYPE_QEMU_XHCI "qemu-xhci" @@ -225,3 +228,5 @@ struct XHCIState { =20 bool nec_quirks; }; + +#endif diff --git a/hw/usb/quirks.h b/hw/usb/quirks.h index 8dc6065527..89480befd7 100644 --- a/hw/usb/quirks.h +++ b/hw/usb/quirks.h @@ -12,6 +12,9 @@ * (at your option) any later version. */ =20 +#ifndef HW_USB_QUIRKS_H +#define HW_USB_QUIRKS_H + /* 1 on 1 copy of linux/drivers/usb/serial/ftdi_sio_ids.h */ #include "quirks-ftdi-ids.h" /* 1 on 1 copy of linux/drivers/usb/serial/pl2303.h */ @@ -908,3 +911,5 @@ static const struct usb_device_id usbredir_ftdi_serial_= ids[] =3D { =20 #undef USB_DEVICE #undef USB_DEVICE_AND_INTERFACE_INFO + +#endif diff --git a/include/fpu/softfloat-macros.h b/include/fpu/softfloat-macros.h index bd5b6418e3..c55aa6d174 100644 --- a/include/fpu/softfloat-macros.h +++ b/include/fpu/softfloat-macros.h @@ -79,6 +79,9 @@ this code that are retained. * version 2 or later. See the COPYING file in the top-level directory. */ =20 +#ifndef FPU_SOFTFLOAT_MACROS_H +#define FPU_SOFTFLOAT_MACROS_H + /*------------------------------------------------------------------------= ---- | Shifts `a' right by the number of bits given in `count'. If any nonzero | bits are shifted off, they are ``jammed'' into the least significant bit= of @@ -796,3 +799,5 @@ static inline flag ne128( uint64_t a0, uint64_t a1, uin= t64_t b0, uint64_t b1 ) return ( a0 !=3D b0 ) || ( a1 !=3D b1 ); =20 } + +#endif diff --git a/include/hw/arm/raspi_platform.h b/include/hw/arm/raspi_platfor= m.h index 6467e88ae6..10083d33df 100644 --- a/include/hw/arm/raspi_platform.h +++ b/include/hw/arm/raspi_platform.h @@ -22,6 +22,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 U= SA */ =20 +#ifndef HW_ARM_RASPI_PLATFORM_H +#define HW_ARM_RASPI_PLATFORM_H + #define MCORE_OFFSET 0x0000 /* Fake frame buffer device * (the multicore sync block) */ #define IC0_OFFSET 0x2000 @@ -126,3 +129,5 @@ #define INTERRUPT_VPU1_HALTED 5 #define INTERRUPT_ILLEGAL_TYPE0 6 #define INTERRUPT_ILLEGAL_TYPE1 7 + +#endif diff --git a/include/hw/kvm/clock.h b/include/hw/kvm/clock.h index 252ea13461..81c66b2302 100644 --- a/include/hw/kvm/clock.h +++ b/include/hw/kvm/clock.h @@ -8,9 +8,11 @@ * * This work is licensed under the terms of the GNU GPL version 2. * See the COPYING file in the top-level directory. - * */ =20 +#ifndef HW_KVM_CLOCK_H +#define HW_KVM_CLOCK_H + #ifdef CONFIG_KVM =20 void kvmclock_create(void); @@ -22,3 +24,5 @@ static inline void kvmclock_create(void) } =20 #endif /* !CONFIG_KVM */ + +#endif diff --git a/include/hw/m68k/mcf_fec.h b/include/hw/m68k/mcf_fec.h index 7f029f7b59..eeb471f9c9 100644 --- a/include/hw/m68k/mcf_fec.h +++ b/include/hw/m68k/mcf_fec.h @@ -7,7 +7,12 @@ * (at your option) any later version. */ =20 +#ifndef HW_M68K_MCF_FEC_H +#define HW_M68K_MCF_FEC_H + #define TYPE_MCF_FEC_NET "mcf-fec" #define MCF_FEC_NET(obj) OBJECT_CHECK(mcf_fec_state, (obj), TYPE_MCF_FEC_N= ET) =20 #define FEC_NUM_IRQ 13 + +#endif diff --git a/include/hw/mips/bios.h b/include/hw/mips/bios.h index d67ef33e83..c03007999a 100644 --- a/include/hw/mips/bios.h +++ b/include/hw/mips/bios.h @@ -1,3 +1,6 @@ +#ifndef HW_MIPS_BIOS_H +#define HW_MIPS_BIOS_H + #include "qemu/units.h" #include "cpu.h" =20 @@ -7,3 +10,5 @@ #else #define BIOS_FILENAME "mipsel_bios.bin" #endif + +#endif diff --git a/include/hw/pci-bridge/simba.h b/include/hw/pci-bridge/simba.h index e13ba27d0b..d8649973ee 100644 --- a/include/hw/pci-bridge/simba.h +++ b/include/hw/pci-bridge/simba.h @@ -24,6 +24,9 @@ * THE SOFTWARE. */ =20 +#ifndef HW_PCI_BRIDGE_SIMBA_H +#define HW_PCI_BRIDGE_SIMBA_H + #include "hw/pci/pci_bridge.h" =20 =20 @@ -35,3 +38,5 @@ typedef struct SimbaPCIBridge { #define TYPE_SIMBA_PCI_BRIDGE "pbm-bridge" #define SIMBA_PCI_BRIDGE(obj) \ OBJECT_CHECK(SimbaPCIBridge, (obj), TYPE_SIMBA_PCI_BRIDGE) + +#endif diff --git a/include/hw/pci/pci_regs.h b/include/hw/pci/pci_regs.h index 7a83142578..77ba64b931 100644 --- a/include/hw/pci/pci_regs.h +++ b/include/hw/pci/pci_regs.h @@ -1,3 +1,8 @@ +#ifndef HW_PCI_PCI_REGS_H +#define HW_PCI_PCI_REGS_H + #include "standard-headers/linux/pci_regs.h" =20 #define PCI_PM_CAP_VER_1_1 0x0002 /* PCI PM spec ver. 1.1 */ + +#endif diff --git a/include/hw/qdev-dma.h b/include/hw/qdev-dma.h index 8cfb0f348e..b00391aa0c 100644 --- a/include/hw/qdev-dma.h +++ b/include/hw/qdev-dma.h @@ -6,5 +6,11 @@ * This work is licensed under the terms of the GNU GPL, version 2 or late= r. * See the COPYING file in the top-level directory. */ + +#ifndef HW_QDEV_DMA_H +#define HW_QDEV_DMA_H + #define DEFINE_PROP_DMAADDR(_n, _s, _f, _d) \ DEFINE_PROP_UINT64(_n, _s, _f, _d) + +#endif diff --git a/include/hw/sparc/sparc64.h b/include/hw/sparc/sparc64.h index 5af4344459..21ab79e343 100644 --- a/include/hw/sparc/sparc64.h +++ b/include/hw/sparc/sparc64.h @@ -1,6 +1,10 @@ +#ifndef HW_SPARC_SPARC64_H +#define HW_SPARC_SPARC64_H =20 #define IVEC_MAX 0x40 =20 SPARCCPU *sparc64_cpu_devinit(const char *cpu_type, uint64_t prom_addr); =20 void sparc64_cpu_set_ivec_irq(void *opaque, int irq, int level); + +#endif diff --git a/include/hw/timer/xlnx-zynqmp-rtc.h b/include/hw/timer/xlnx-zyn= qmp-rtc.h index 5ba4d8bc4a..6e9134edf6 100644 --- a/include/hw/timer/xlnx-zynqmp-rtc.h +++ b/include/hw/timer/xlnx-zynqmp-rtc.h @@ -24,6 +24,9 @@ * THE SOFTWARE. */ =20 +#ifndef HW_TIMER_XLNX_ZYNQMP_RTC_H +#define HW_TIMER_XLNX_ZYNQMP_RTC_H + #include "hw/register.h" =20 #define TYPE_XLNX_ZYNQMP_RTC "xlnx-zynmp.rtc" @@ -84,3 +87,5 @@ typedef struct XlnxZynqMPRTC { uint32_t regs[XLNX_ZYNQMP_RTC_R_MAX]; RegisterInfo regs_info[XLNX_ZYNQMP_RTC_R_MAX]; } XlnxZynqMPRTC; + +#endif diff --git a/include/ui/spice-display.h b/include/ui/spice-display.h index 53c3612c32..eed60e4fae 100644 --- a/include/ui/spice-display.h +++ b/include/ui/spice-display.h @@ -15,6 +15,9 @@ * along with this program; if not, see . */ =20 +#ifndef UI_SPICE_DISPLAY_H +#define UI_SPICE_DISPLAY_H + #include #include #include @@ -183,3 +186,5 @@ int qemu_spice_display_is_running(SimpleSpiceDisplay *s= sd); bool qemu_spice_fill_device_address(QemuConsole *con, char *device_address, size_t size); + +#endif diff --git a/linux-user/aarch64/syscall_nr.h b/linux-user/aarch64/syscall_n= r.h index a3c9a3b679..f00ffd7fb8 100644 --- a/linux-user/aarch64/syscall_nr.h +++ b/linux-user/aarch64/syscall_nr.h @@ -2,6 +2,9 @@ * This file contains the system call numbers. */ =20 +#ifndef LINUX_USER_AARCH64_SYSCALL_NR_H +#define LINUX_USER_AARCH64_SYSCALL_NR_H + #define TARGET_NR_io_setup 0 #define TARGET_NR_io_destroy 1 #define TARGET_NR_io_submit 2 @@ -274,3 +277,4 @@ #define TARGET_NR_mlock2 284 #define TARGET_NR_copy_file_range 285 =20 +#endif diff --git a/linux-user/aarch64/termbits.h b/linux-user/aarch64/termbits.h index f9f80f0f37..0ab448d090 100644 --- a/linux-user/aarch64/termbits.h +++ b/linux-user/aarch64/termbits.h @@ -1,6 +1,9 @@ /* from asm/termbits.h */ /* NOTE: exactly the same as i386 */ =20 +#ifndef LINUX_USER_AARCH64_TERMBITS_H +#define LINUX_USER_AARCH64_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -220,3 +223,5 @@ struct target_termios { #define TARGET_TIOCPKT_DOSTOP 32 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/alpha/syscall_nr.h b/linux-user/alpha/syscall_nr.h index fbb1ed288b..2e5541bbf9 100644 --- a/linux-user/alpha/syscall_nr.h +++ b/linux-user/alpha/syscall_nr.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_ALPHA_SYSCALL_NR_H +#define LINUX_USER_ALPHA_SYSCALL_NR_H + #define TARGET_NR_osf_syscall 0 /* not implemented */ #define TARGET_NR_exit 1 #define TARGET_NR_fork 2 @@ -450,3 +453,5 @@ #define TARGET_NR_getrandom 511 #define TARGET_NR_memfd_create 512 #define TARGET_NR_execveat 513 + +#endif diff --git a/linux-user/alpha/termbits.h b/linux-user/alpha/termbits.h index 139bc87fa6..a71425174a 100644 --- a/linux-user/alpha/termbits.h +++ b/linux-user/alpha/termbits.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_ALPHA_TERMBITS_H +#define LINUX_USER_ALPHA_TERMBITS_H + typedef unsigned char target_cc_t; typedef unsigned int target_speed_t; typedef unsigned int target_tcflag_t; @@ -263,3 +266,5 @@ struct target_termios { #define TARGET_TIOCGICOUNT 0x545D /* read serial port inline interrupt cou= nts */ #define TARGET_TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ #define TARGET_TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ + +#endif diff --git a/linux-user/arm/syscall_nr.h b/linux-user/arm/syscall_nr.h index cc9089ccdc..e7eda0d766 100644 --- a/linux-user/arm/syscall_nr.h +++ b/linux-user/arm/syscall_nr.h @@ -2,6 +2,9 @@ * This file contains the system call numbers. */ =20 +#ifndef LINUX_USER_ARM_SYSCALL_NR_H +#define LINUX_USER_ARM_SYSCALL_NR_H + #define TARGET_NR_restart_syscall ( 0) #define TARGET_NR_exit ( 1) #define TARGET_NR_fork ( 2) @@ -396,3 +399,5 @@ #define TARGET_NR_userfaultfd (388) #define TARGET_NR_membarrier (389) #define TARGET_NR_mlock2 (390) + +#endif diff --git a/linux-user/arm/termbits.h b/linux-user/arm/termbits.h index a61e138ec4..e555cff105 100644 --- a/linux-user/arm/termbits.h +++ b/linux-user/arm/termbits.h @@ -1,6 +1,9 @@ /* from asm/termbits.h */ /* NOTE: exactly the same as i386 */ =20 +#ifndef LINUX_USER_ARM_TERMBITS_H +#define LINUX_USER_ARM_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -215,3 +218,5 @@ struct target_termios { #define TARGET_TIOCPKT_DOSTOP 32 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/cris/syscall_nr.h b/linux-user/cris/syscall_nr.h index 44f0b645b4..4b6cf65c42 100644 --- a/linux-user/cris/syscall_nr.h +++ b/linux-user/cris/syscall_nr.h @@ -2,6 +2,9 @@ * This file contains the system call numbers, and stub macros for libc. */ =20 +#ifndef LINUX_USER_CRIS_SYSCALL_NR_H +#define LINUX_USER_CRIS_SYSCALL_NR_H + #define TARGET_NR_restart_syscall 0 #define TARGET_NR_exit 1 #define TARGET_NR_fork 2 @@ -360,3 +363,5 @@ #define TARGET_NR_memfd_create 357 #define TARGET_NR_bpf 358 #define TARGET_NR_execveat 359 + +#endif diff --git a/linux-user/cris/termbits.h b/linux-user/cris/termbits.h index c825cd2f5e..475ee70fed 100644 --- a/linux-user/cris/termbits.h +++ b/linux-user/cris/termbits.h @@ -1,5 +1,8 @@ /* from asm/termbits.h */ =20 +#ifndef LINUX_USER_CRIS_TERMBITS_H +#define LINUX_USER_CRIS_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -212,3 +215,5 @@ struct target_termios { #define TARGET_TIOCPKT_DOSTOP 32 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/errno_defs.h b/linux-user/errno_defs.h index 55fbebda51..aaf5208d62 100644 --- a/linux-user/errno_defs.h +++ b/linux-user/errno_defs.h @@ -4,6 +4,10 @@ * * Taken from asm-generic/errno-base.h and asm-generic/errno.h */ + +#ifndef LINUX_USER_ERRNO_DEFS_H +#define LINUX_USER_ERRNO_DEFS_H + #define TARGET_EPERM 1 /* Operation not permitted */ #define TARGET_ENOENT 2 /* No such file or directory */ #define TARGET_ESRCH 3 /* No such process */ @@ -159,3 +163,5 @@ * clash with a valid guest errno now or in the future. */ #define TARGET_QEMU_ESIGRETURN 513 /* Return from signal */ + +#endif diff --git a/linux-user/flat.h b/linux-user/flat.h index 6f2d0c4b2d..1e44b33443 100644 --- a/linux-user/flat.h +++ b/linux-user/flat.h @@ -7,6 +7,9 @@ * support uClinux flat-format executables. */ =20 +#ifndef LINUX_USER_FLAT_H +#define LINUX_USER_FLAT_H + #define FLAT_VERSION 0x00000004L =20 #ifdef CONFIG_BINFMT_SHARED_FLAT @@ -65,3 +68,5 @@ struct flat_hdr { #define OLD_FLAT_RELOC_TYPE_BSS 2 =20 # define OLD_FLAT_FLAG_RAM 0x1 /* load program entirely into RAM */ + +#endif diff --git a/linux-user/hppa/sockbits.h b/linux-user/hppa/sockbits.h index 2641aea859..23f69a3293 100644 --- a/linux-user/hppa/sockbits.h +++ b/linux-user/hppa/sockbits.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_HPPA_SOCKBITS_H +#define LINUX_USER_HPPA_SOCKBITS_H + #define TARGET_SOL_SOCKET 0xffff =20 #define TARGET_SO_DEBUG 0x0001 @@ -68,3 +71,5 @@ * have to define SOCK_NONBLOCK to a different value here. */ #define TARGET_SOCK_NONBLOCK 0x40000000 + +#endif diff --git a/linux-user/hppa/syscall_nr.h b/linux-user/hppa/syscall_nr.h index 9c1d0a195d..ae41e94321 100644 --- a/linux-user/hppa/syscall_nr.h +++ b/linux-user/hppa/syscall_nr.h @@ -2,6 +2,9 @@ * This file contains the system call numbers. */ =20 +#ifndef LINUX_USER_HPPA_SYSCALL_NR_H +#define LINUX_USER_HPPA_SYSCALL_NR_H + #define TARGET_NR_restart_syscall 0 #define TARGET_NR_exit 1 #define TARGET_NR_fork 2 @@ -351,3 +354,5 @@ #define TARGET_NR_copy_file_range 346 #define TARGET_NR_preadv2 347 #define TARGET_NR_pwritev2 348 + +#endif diff --git a/linux-user/hppa/termbits.h b/linux-user/hppa/termbits.h index ad51c9c911..8fba839dd4 100644 --- a/linux-user/hppa/termbits.h +++ b/linux-user/hppa/termbits.h @@ -1,5 +1,8 @@ /* from asm/termbits.h */ =20 +#ifndef LINUX_USER_HPPA_TERMBITS_H +#define LINUX_USER_HPPA_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -219,3 +222,5 @@ struct target_termios { #define TARGET_TIOCPKT_DOSTOP 32 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/i386/syscall_nr.h b/linux-user/i386/syscall_nr.h index bc1bc233ed..3234ec21c6 100644 --- a/linux-user/i386/syscall_nr.h +++ b/linux-user/i386/syscall_nr.h @@ -2,6 +2,9 @@ * This file contains the system call numbers. */ =20 +#ifndef LINUX_USER_I386_SYSCALL_NR_H +#define LINUX_USER_I386_SYSCALL_NR_H + #define TARGET_NR_restart_syscall 0 #define TARGET_NR_exit 1 #define TARGET_NR_fork 2 @@ -380,3 +383,5 @@ #define TARGET_NR_membarrier 375 #define TARGET_NR_mlock2 376 #define TARGET_NR_copy_file_range 377 + +#endif diff --git a/linux-user/i386/termbits.h b/linux-user/i386/termbits.h index 32dd0dde5d..88264bbde7 100644 --- a/linux-user/i386/termbits.h +++ b/linux-user/i386/termbits.h @@ -1,5 +1,8 @@ /* from asm/termbits.h */ =20 +#ifndef LINUX_USER_I386_TERMBITS_H +#define LINUX_USER_I386_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -225,3 +228,5 @@ struct target_termios { #define TARGET_TIOCPKT_DOSTOP 32 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/m68k/syscall_nr.h b/linux-user/m68k/syscall_nr.h index d239551b34..d33d8e98a7 100644 --- a/linux-user/m68k/syscall_nr.h +++ b/linux-user/m68k/syscall_nr.h @@ -2,6 +2,9 @@ * This file contains the system call numbers. */ =20 +#ifndef LINUX_USER_M68K_SYSCALL_NR_H +#define LINUX_USER_M68K_SYSCALL_NR_H + #define TARGET_NR_exit 1 #define TARGET_NR_fork 2 #define TARGET_NR_read 3 @@ -379,3 +382,5 @@ #define TARGET_NR_copy_file_range 376 #define TARGET_NR_preadv2 377 #define TARGET_NR_pwritev2 378 + +#endif diff --git a/linux-user/m68k/termbits.h b/linux-user/m68k/termbits.h index 9df58dc5cb..23840aa968 100644 --- a/linux-user/m68k/termbits.h +++ b/linux-user/m68k/termbits.h @@ -1,6 +1,9 @@ /* from asm/termbits.h */ /* NOTE: exactly the same as i386 */ =20 +#ifndef LINUX_USER_M68K_TERMBITS_H +#define LINUX_USER_M68K_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -226,3 +229,5 @@ struct target_termios { #define TARGET_TIOCPKT_DOSTOP 32 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/microblaze/syscall_nr.h b/linux-user/microblaze/sys= call_nr.h index 5d1a47a9a9..aa2eb93881 100644 --- a/linux-user/microblaze/syscall_nr.h +++ b/linux-user/microblaze/syscall_nr.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_MICROBLAZE_SYSCALL_NR_H +#define LINUX_USER_MICROBLAZE_SYSCALL_NR_H + #define TARGET_NR_restart_syscall 0 /* ok */ #define TARGET_NR_exit 1 /* ok */ #define TARGET_NR_fork 2 /* not for no MMU - weird */ @@ -390,3 +393,5 @@ #define TARGET_NR_memfd_create 386 #define TARGET_NR_bpf 387 #define TARGET_NR_execveat 388 + +#endif diff --git a/linux-user/microblaze/termbits.h b/linux-user/microblaze/termb= its.h index c825cd2f5e..17db8a4473 100644 --- a/linux-user/microblaze/termbits.h +++ b/linux-user/microblaze/termbits.h @@ -1,5 +1,8 @@ /* from asm/termbits.h */ =20 +#ifndef LINUX_USER_MICROBLAZE_TERMBITS_H +#define LINUX_USER_MICROBLAZE_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -212,3 +215,5 @@ struct target_termios { #define TARGET_TIOCPKT_DOSTOP 32 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/mips/syscall_nr.h b/linux-user/mips/syscall_nr.h index e70adfc2fe..7fa7fa5a86 100644 --- a/linux-user/mips/syscall_nr.h +++ b/linux-user/mips/syscall_nr.h @@ -1,6 +1,10 @@ /* * Linux o32 style syscalls are in the range from 4000 to 4999. */ + +#ifndef LINUX_USER_MIPS_SYSCALL_NR_H +#define LINUX_USER_MIPS_SYSCALL_NR_H + #define TARGET_NR_Linux 4000 #define TARGET_NR_syscall (TARGET_NR_Linux + 0) #define TARGET_NR_exit (TARGET_NR_Linux + 1) @@ -372,3 +376,5 @@ #define TARGET_NR_statx (TARGET_NR_Linux + 366) #define TARGET_NR_rseq (TARGET_NR_Linux + 367) #define TARGET_NR_io_pgetevents (TARGET_NR_Linux + 368) + +#endif diff --git a/linux-user/mips/termbits.h b/linux-user/mips/termbits.h index 49a72c5539..3287cf6df8 100644 --- a/linux-user/mips/termbits.h +++ b/linux-user/mips/termbits.h @@ -1,5 +1,8 @@ /* from asm/termbits.h */ =20 +#ifndef LINUX_USER_MIPS_TERMBITS_H +#define LINUX_USER_MIPS_TERMBITS_H + #define TARGET_NCCS 23 =20 struct target_termios { @@ -256,3 +259,5 @@ struct target_termios { #define TARGET_TIOCGICOUNT 0x5492 /* read serial port inline interrupt= counts */ #define TARGET_TIOCGHAYESESP 0x5493 /* Get Hayes ESP configuration */ #define TARGET_TIOCSHAYESESP 0x5494 /* Set Hayes ESP configuration */ + +#endif diff --git a/linux-user/mips64/syscall_nr.h b/linux-user/mips64/syscall_nr.h index ff218a9bf2..db40f69ca2 100644 --- a/linux-user/mips64/syscall_nr.h +++ b/linux-user/mips64/syscall_nr.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_MIPS64_SYSCALL_NR_H +#define LINUX_USER_MIPS64_SYSCALL_NR_H + #ifdef TARGET_ABI32 /* * Linux N32 syscalls are in the range from 6000 to 6999. @@ -672,3 +675,5 @@ #define TARGET_NR_rseq (TARGET_NR_Linux + 327) #define TARGET_NR_io_pgetevents (TARGET_NR_Linux + 328) #endif + +#endif diff --git a/linux-user/nios2/syscall_nr.h b/linux-user/nios2/syscall_nr.h index 8b46763673..8fb87864ca 100644 --- a/linux-user/nios2/syscall_nr.h +++ b/linux-user/nios2/syscall_nr.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_NIOS2_SYSCALL_NR_H +#define LINUX_USER_NIOS2_SYSCALL_NR_H + #define TARGET_NR_io_setup 0 #define TARGET_NR_io_destroy 1 #define TARGET_NR_io_submit 2 @@ -327,3 +330,5 @@ #define TARGET_NR_uselib 1077 #define TARGET_NR__sysctl 1078 #define TARGET_NR_fork 1079 + +#endif diff --git a/linux-user/nios2/termbits.h b/linux-user/nios2/termbits.h index f9f80f0f37..425a2fe6ef 100644 --- a/linux-user/nios2/termbits.h +++ b/linux-user/nios2/termbits.h @@ -1,6 +1,9 @@ /* from asm/termbits.h */ /* NOTE: exactly the same as i386 */ =20 +#ifndef LINUX_USER_NIOS2_TERMBITS_H +#define LINUX_USER_NIOS2_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -220,3 +223,5 @@ struct target_termios { #define TARGET_TIOCPKT_DOSTOP 32 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/openrisc/syscall_nr.h b/linux-user/openrisc/syscall= _nr.h index 04059d020c..7763dbcfd8 100644 --- a/linux-user/openrisc/syscall_nr.h +++ b/linux-user/openrisc/syscall_nr.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_OPENRISC_SYSCALL_NR_H +#define LINUX_USER_OPENRISC_SYSCALL_NR_H + #define TARGET_NR_io_setup 0 #define TARGET_NR_io_destroy 1 #define TARGET_NR_io_submit 2 @@ -502,3 +505,5 @@ #define TARGET_NR_stat64 TARGET_NR_3264_stat #define TARGET_NR_lstat64 TARGET_NR_3264_lstat #endif + +#endif diff --git a/linux-user/openrisc/termbits.h b/linux-user/openrisc/termbits.h index 231a49806b..7a635ffbc6 100644 --- a/linux-user/openrisc/termbits.h +++ b/linux-user/openrisc/termbits.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_OPENRISC_TERMBITS_H +#define LINUX_USER_OPENRISC_TERMBITS_H + typedef unsigned char target_openrisc_cc; /*cc_t*/ typedef unsigned int target_openrisc_speed; /*speed_t*/ typedef unsigned int target_openrisc_tcflag; /*tcflag_t*/ @@ -294,3 +297,5 @@ struct target_termios3 { #define TARGET_TIOCPKT_IOCTL 64 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/ppc/syscall_nr.h b/linux-user/ppc/syscall_nr.h index afa36544f1..b57a07b931 100644 --- a/linux-user/ppc/syscall_nr.h +++ b/linux-user/ppc/syscall_nr.h @@ -1,6 +1,10 @@ /* * This file contains the system call numbers. */ + +#ifndef LINUX_USER_PPC_SYSCALL_NR_H +#define LINUX_USER_PPC_SYSCALL_NR_H + #define TARGET_NR_restart_syscall 0 #define TARGET_NR_exit 1 #define TARGET_NR_fork 2 @@ -394,3 +398,5 @@ #define TARGET_NR_shmget 376 #define TARGET_NR_shmctl 377 #define TARGET_NR_mlock2 378 + +#endif diff --git a/linux-user/ppc/termbits.h b/linux-user/ppc/termbits.h index a5b1bb783b..19e4c6eda8 100644 --- a/linux-user/ppc/termbits.h +++ b/linux-user/ppc/termbits.h @@ -1,5 +1,8 @@ /* from asm/termbits.h */ =20 +#ifndef LINUX_USER_PPC_TERMBITS_H +#define LINUX_USER_PPC_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -235,3 +238,5 @@ struct target_termios { =20 #define TARGET_TIOCMIWAIT 0x545C /* wait for a change on serial input line= (s) */ #define TARGET_TIOCGICOUNT 0x545D /* read serial port inline interrupt cou= nts */ + +#endif diff --git a/linux-user/riscv/syscall_nr.h b/linux-user/riscv/syscall_nr.h index 7e30f1f1ef..dab6509e3a 100644 --- a/linux-user/riscv/syscall_nr.h +++ b/linux-user/riscv/syscall_nr.h @@ -3,6 +3,9 @@ * of recently-added arches including RISC-V. */ =20 +#ifndef LINUX_USER_RISCV_SYSCALL_NR_H +#define LINUX_USER_RISCV_SYSCALL_NR_H + #define TARGET_NR_io_setup 0 #define TARGET_NR_io_destroy 1 #define TARGET_NR_io_submit 2 @@ -285,3 +288,5 @@ #define TARGET_NR_copy_file_range 285 =20 #define TARGET_NR_syscalls (TARGET_NR_copy_file_range + 1) + +#endif diff --git a/linux-user/riscv/target_syscall.h b/linux-user/riscv/target_sy= scall.h index ee81d8bc88..a88e821f73 100644 --- a/linux-user/riscv/target_syscall.h +++ b/linux-user/riscv/target_syscall.h @@ -5,6 +5,9 @@ * Reference: linux/arch/riscv/include/uapi/asm/ptrace.h */ =20 +#ifndef LINUX_USER_RISCV_TARGET_SYSCALL_H +#define LINUX_USER_RISCV_TARGET_SYSCALL_H + struct target_pt_regs { abi_long sepc; abi_long ra; @@ -54,3 +57,5 @@ struct target_pt_regs { /* clone(flags, newsp, ptidptr, tls, ctidptr) for RISC-V */ /* This comes from linux/kernel/fork.c, CONFIG_CLONE_BACKWARDS */ #define TARGET_CLONE_BACKWARDS + +#endif diff --git a/linux-user/riscv/termbits.h b/linux-user/riscv/termbits.h index 7e4e230588..5e0af0dd3f 100644 --- a/linux-user/riscv/termbits.h +++ b/linux-user/riscv/termbits.h @@ -1,6 +1,9 @@ /* from asm/termbits.h */ /* NOTE: exactly the same as i386 */ =20 +#ifndef LINUX_USER_RISCV_TERMBITS_H +#define LINUX_USER_RISCV_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -220,3 +223,5 @@ struct target_termios { #define TARGET_TIOCPKT_DOSTOP 32 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/s390x/syscall_nr.h b/linux-user/s390x/syscall_nr.h index 1a66c5561d..b1553a0810 100644 --- a/linux-user/s390x/syscall_nr.h +++ b/linux-user/s390x/syscall_nr.h @@ -2,6 +2,9 @@ * This file contains the system call numbers. */ =20 +#ifndef LINUX_USER_S390X_SYSCALL_NR_H +#define LINUX_USER_S390X_SYSCALL_NR_H + #define TARGET_NR_exit 1 #define TARGET_NR_fork 2 #define TARGET_NR_read 3 @@ -391,3 +394,5 @@ #define TARGET_NR_newfstatat 293 =20 #endif + +#endif diff --git a/linux-user/s390x/termbits.h b/linux-user/s390x/termbits.h index 8bcca89cd7..9affa8f41a 100644 --- a/linux-user/s390x/termbits.h +++ b/linux-user/s390x/termbits.h @@ -6,6 +6,9 @@ * Derived from "include/asm-i386/termbits.h" */ =20 +#ifndef LINUX_USER_S390X_TERMBITS_H +#define LINUX_USER_S390X_TERMBITS_H + #define TARGET_NCCS 19 struct target_termios { unsigned int c_iflag; /* input mode flags */ @@ -282,3 +285,4 @@ struct target_ktermios { =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ =20 +#endif diff --git a/linux-user/sh4/syscall_nr.h b/linux-user/sh4/syscall_nr.h index d6c1e059f6..d53a2a07dd 100644 --- a/linux-user/sh4/syscall_nr.h +++ b/linux-user/sh4/syscall_nr.h @@ -2,6 +2,9 @@ * This file contains the system call numbers. */ =20 +#ifndef LINUX_USER_SH4_SYSCALL_NR_H +#define LINUX_USER_SH4_SYSCALL_NR_H + #define TARGET_NR_restart_syscall 0 #define TARGET_NR_exit 1 #define TARGET_NR_fork 2 @@ -386,3 +389,5 @@ #define TARGET_NR_copy_file_range 380 #define TARGET_NR_preadv2 381 #define TARGET_NR_pwritev2 382 + +#endif diff --git a/linux-user/sh4/termbits.h b/linux-user/sh4/termbits.h index 5723ed7752..dd125b6a2b 100644 --- a/linux-user/sh4/termbits.h +++ b/linux-user/sh4/termbits.h @@ -1,5 +1,8 @@ /* from asm/termbits.h */ =20 +#ifndef LINUX_USER_SH4_TERMBITS_H +#define LINUX_USER_SH4_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -273,3 +276,5 @@ tus register */ serial input line(s) */ #define TARGET_TIOCGICOUNT TARGET_IOR('T', 93, int) /* 0x545D */ /* re= ad serial port inline interrupt counts */ + +#endif diff --git a/linux-user/socket.h b/linux-user/socket.h index 4c0b5c2dfa..680a9218a9 100644 --- a/linux-user/socket.h +++ b/linux-user/socket.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_SOCKET_H +#define LINUX_USER_SOCKET_H + #include "sockbits.h" =20 #ifndef TARGET_ARCH_HAS_SOCKET_TYPES @@ -35,3 +38,5 @@ enum sock_type { #define TARGET_SOCK_NONBLOCK TARGET_O_NONBLOCK #endif #endif /* TARGET_ARCH_HAS_SOCKET_TYPES */ + +#endif diff --git a/linux-user/sparc/syscall_nr.h b/linux-user/sparc/syscall_nr.h index 2d77e19bec..162099f9ce 100644 --- a/linux-user/sparc/syscall_nr.h +++ b/linux-user/sparc/syscall_nr.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_SPARC_SYSCALL_NR_H +#define LINUX_USER_SPARC_SYSCALL_NR_H + #define TARGET_NR_exit 1 /* Common = */ #define TARGET_NR_fork 2 /* Common = */ #define TARGET_NR_read 3 /* Common = */ @@ -356,3 +359,5 @@ #define TARGET_NR_preadv2 358 #define TARGET_NR_pwritev2 359 #define TARGET_NR_statx 360 + +#endif diff --git a/linux-user/sparc/termbits.h b/linux-user/sparc/termbits.h index 113d6dfbdb..f85219ed71 100644 --- a/linux-user/sparc/termbits.h +++ b/linux-user/sparc/termbits.h @@ -1,5 +1,8 @@ /* from asm/termbits.h */ =20 +#ifndef LINUX_USER_SPARC_TERMBITS_H +#define LINUX_USER_SPARC_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -278,3 +281,5 @@ struct target_termios { #define TARGET_TIOCSERSETMULTI 0x545B /* Set multiport config */ #define TARGET_TIOCMIWAIT 0x545C /* Wait input */ #define TARGET_TIOCGICOUNT 0x545D /* Read serial port inline interrupt cou= nts */ + +#endif diff --git a/linux-user/sparc64/syscall_nr.h b/linux-user/sparc64/syscall_n= r.h index 0b91b896da..6b088c9862 100644 --- a/linux-user/sparc64/syscall_nr.h +++ b/linux-user/sparc64/syscall_nr.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_SPARC64_SYSCALL_NR_H +#define LINUX_USER_SPARC64_SYSCALL_NR_H + #define TARGET_NR_restart_syscall 0 /* Linux Specific */ #define TARGET_NR_exit 1 /* Common = */ #define TARGET_NR_fork 2 /* Common = */ @@ -359,3 +362,5 @@ #define TARGET_NR_preadv2 358 #define TARGET_NR_pwritev2 359 #define TARGET_NR_statx 360 + +#endif diff --git a/linux-user/sparc64/termbits.h b/linux-user/sparc64/termbits.h index 113d6dfbdb..11b5abcf84 100644 --- a/linux-user/sparc64/termbits.h +++ b/linux-user/sparc64/termbits.h @@ -1,5 +1,8 @@ /* from asm/termbits.h */ =20 +#ifndef LINUX_USER_SPARC64_TERMBITS_H +#define LINUX_USER_SPARC64_TERMBITS_H + #define TARGET_NCCS 19 =20 struct target_termios { @@ -278,3 +281,5 @@ struct target_termios { #define TARGET_TIOCSERSETMULTI 0x545B /* Set multiport config */ #define TARGET_TIOCMIWAIT 0x545C /* Wait input */ #define TARGET_TIOCGICOUNT 0x545D /* Read serial port inline interrupt cou= nts */ + +#endif diff --git a/linux-user/target_flat.h b/linux-user/target_flat.h index 0ba6bdd12e..8fe189ea6f 100644 --- a/linux-user/target_flat.h +++ b/linux-user/target_flat.h @@ -1,6 +1,10 @@ /* If your arch needs to do custom stuff, create your own target_flat.h * header file in linux-user// */ + +#ifndef LINUX_USER_TARGET_FLAT_H +#define LINUX_USER_TARGET_FLAT_H + #define flat_argvp_envp_on_stack() 1 #define flat_reloc_valid(reloc, size) ((reloc) <=3D= (size)) #define flat_old_ram_flag(flag) (flag) @@ -8,3 +12,5 @@ #define flat_get_addr_from_rp(rp, relval, flags, persistent) (rp) #define flat_set_persistent(relval, persistent) (*persistent) #define flat_put_addr_at_rp(rp, addr, relval) put_user_ual(= addr, rp) + +#endif diff --git a/linux-user/x86_64/syscall_nr.h b/linux-user/x86_64/syscall_nr.h index 16397b3e8f..9b6981e74c 100644 --- a/linux-user/x86_64/syscall_nr.h +++ b/linux-user/x86_64/syscall_nr.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_X86_64_SYSCALL_NR_H +#define LINUX_USER_X86_64_SYSCALL_NR_H + #define TARGET_NR_read 0 #define TARGET_NR_write 1 #define TARGET_NR_open 2 @@ -325,3 +328,5 @@ #define TARGET_NR_membarrier 324 #define TARGET_NR_mlock2 325 #define TARGET_NR_copy_file_range 326 + +#endif diff --git a/linux-user/x86_64/termbits.h b/linux-user/x86_64/termbits.h index f5776a8aa6..c8bb5996b1 100644 --- a/linux-user/x86_64/termbits.h +++ b/linux-user/x86_64/termbits.h @@ -1,3 +1,6 @@ +#ifndef LINUX_USER_X86_64_TERMBITS_H +#define LINUX_USER_X86_64_TERMBITS_H + #define TARGET_NCCS 19 =20 typedef unsigned char target_cc_t; @@ -246,3 +249,5 @@ struct target_termios { #define TARGET_TIOCPKT_DOSTOP 32 =20 #define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ + +#endif diff --git a/linux-user/xtensa/target_flat.h b/linux-user/xtensa/target_fla= t.h index 732adddb0d..25fe3f5f3b 100644 --- a/linux-user/xtensa/target_flat.h +++ b/linux-user/xtensa/target_flat.h @@ -1,6 +1,6 @@ -/* If your arch needs to do custom stuff, create your own target_flat.h - * header file in linux-user// - */ +#ifndef LINUX_USER_XTENSA_TARGET_FLAT_H +#define LINUX_USER_XTENSA_TARGET_FLAT_H + #define flat_argvp_envp_on_stack() 0 #define flat_reloc_valid(reloc, size) ((reloc) <=3D= (size)) #define flat_old_ram_flag(flag) (flag) @@ -8,3 +8,5 @@ #define flat_get_addr_from_rp(rp, relval, flags, persistent) (rp) #define flat_set_persistent(relval, persistent) (*persistent) #define flat_put_addr_at_rp(rp, addr, relval) put_user_ual(= addr, rp) + +#endif diff --git a/target/cris/crisv10-decode.h b/target/cris/crisv10-decode.h index bdb4b6d318..028179bd0f 100644 --- a/target/cris/crisv10-decode.h +++ b/target/cris/crisv10-decode.h @@ -18,6 +18,9 @@ * License along with this library; if not, see . */ =20 +#ifndef TARGET_CRIS_CRISV10_DECODE_H +#define TARGET_CRIS_CRISV10_DECODE_H + #define CRISV10_MODE_QIMMEDIATE 0 #define CRISV10_MODE_REG 1 #define CRISV10_MODE_INDIRECT 2 @@ -106,3 +109,4 @@ #define CRISV10_IND_MOVEM_M_R 14 #define CRISV10_IND_MOVEM_R_M 15 =20 +#endif diff --git a/target/cris/mmu.h b/target/cris/mmu.h index 0217f476de..9ab1642b96 100644 --- a/target/cris/mmu.h +++ b/target/cris/mmu.h @@ -1,3 +1,6 @@ +#ifndef TARGET_CRIS_MMU_H +#define TARGET_CRIS_MMU_H + #define CRIS_MMU_ERR_EXEC 0 #define CRIS_MMU_ERR_READ 1 #define CRIS_MMU_ERR_WRITE 2 @@ -15,3 +18,5 @@ void cris_mmu_flush_pid(CPUCRISState *env, uint32_t pid); int cris_mmu_translate(struct cris_mmu_result *res, CPUCRISState *env, uint32_t vaddr, int rw, int mmu_idx, int debug); + +#endif diff --git a/target/microblaze/microblaze-decode.h b/target/microblaze/micr= oblaze-decode.h index 401319ed46..17b2f29fff 100644 --- a/target/microblaze/microblaze-decode.h +++ b/target/microblaze/microblaze-decode.h @@ -17,6 +17,9 @@ * License along with this library; if not, see . */ =20 +#ifndef TARGET_MICROBLAZE_MICROBLAZE_DECODE_H +#define TARGET_MICROBLAZE_MICROBLAZE_DECODE_H + /* Convenient binary macros. */ #define HEX__(n) 0x##n##LU #define B8__(x) ((x&0x0000000FLU)?1:0) \ @@ -53,3 +56,4 @@ =20 #define DEC_STREAM {B8(00010011), B8(00110111)} =20 +#endif diff --git a/target/microblaze/mmu.h b/target/microblaze/mmu.h index a4272b6356..75e5301c79 100644 --- a/target/microblaze/mmu.h +++ b/target/microblaze/mmu.h @@ -17,6 +17,9 @@ * License along with this library; if not, see . */ =20 +#ifndef TARGET_MICROBLAZE_MMU_H +#define TARGET_MICROBLAZE_MMU_H + #define MMU_R_PID 0 #define MMU_R_ZPR 1 #define MMU_R_TLBX 2 @@ -93,3 +96,5 @@ unsigned int mmu_translate(struct microblaze_mmu *mmu, uint32_t mmu_read(CPUMBState *env, bool ea, uint32_t rn); void mmu_write(CPUMBState *env, bool ea, uint32_t rn, uint32_t v); void mmu_init(struct microblaze_mmu *mmu); + +#endif diff --git a/target/moxie/mmu.h b/target/moxie/mmu.h index 284a44d18e..d80690f4d2 100644 --- a/target/moxie/mmu.h +++ b/target/moxie/mmu.h @@ -1,3 +1,6 @@ +#ifndef TARGET_MOXIE_MMU_H +#define TARGET_MOXIE_MMU_H + #define MOXIE_MMU_ERR_EXEC 0 #define MOXIE_MMU_ERR_READ 1 #define MOXIE_MMU_ERR_WRITE 2 @@ -12,3 +15,5 @@ typedef struct { int moxie_mmu_translate(MoxieMMUResult *res, CPUMoxieState *env, uint32_t vaddr, int rw, int mmu_idx); + +#endif diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index dc9d53d4be..47450a3cdb 100644 --- a/target/riscv/cpu_bits.h +++ b/target/riscv/cpu_bits.h @@ -1,5 +1,8 @@ /* RISC-V ISA constants */ =20 +#ifndef TARGET_RISCV_CPU_BITS_H +#define TARGET_RISCV_CPU_BITS_H + #define get_field(reg, mask) (((reg) & \ (target_ulong)(mask)) / ((mask) & ~((mask) << 1))) #define set_field(reg, mask, val) (((reg) & ~(target_ulong)(mask)) | \ @@ -527,3 +530,5 @@ #define SIP_SSIP MIP_SSIP #define SIP_STIP MIP_STIP #define SIP_SEIP MIP_SEIP + +#endif diff --git a/target/riscv/cpu_user.h b/target/riscv/cpu_user.h index 52d380aa98..02afad608b 100644 --- a/target/riscv/cpu_user.h +++ b/target/riscv/cpu_user.h @@ -1,3 +1,6 @@ +#ifndef TARGET_RISCV_CPU_USER_H +#define TARGET_RISCV_CPU_USER_H + #define xRA 1 /* return address (aka link register) */ #define xSP 2 /* stack pointer */ #define xGP 3 /* global pointer */ @@ -12,3 +15,5 @@ #define xA6 16 #define xA7 17 /* syscall number for RVI ABI */ #define xT0 5 /* syscall number for RVE ABI */ + +#endif diff --git a/target/riscv/instmap.h b/target/riscv/instmap.h index 58baa1ba1f..f8ad7d60fd 100644 --- a/target/riscv/instmap.h +++ b/target/riscv/instmap.h @@ -16,6 +16,9 @@ * this program. If not, see . */ =20 +#ifndef TARGET_RISCV_INSTMAP_H +#define TARGET_RISCV_INSTMAP_H + #define MASK_OP_MAJOR(op) (op & 0x7F) enum { /* rv32i, rv64i, rv32m */ @@ -362,3 +365,5 @@ enum { #define GET_C_RS2(inst) extract32(inst, 2, 5) #define GET_C_RS1S(inst) (8 + extract32(inst, 7, 3)) #define GET_C_RS2S(inst) (8 + extract32(inst, 2, 3)) + +#endif diff --git a/target/tricore/tricore-opcodes.h b/target/tricore/tricore-opco= des.h index 40bc121ba4..f7135f183d 100644 --- a/target/tricore/tricore-opcodes.h +++ b/target/tricore/tricore-opcodes.h @@ -15,6 +15,9 @@ * License along with this library; if not, see . */ =20 +#ifndef TARGET_TRICORE_TRICORE_OPCODES_H +#define TARGET_TRICORE_TRICORE_OPCODES_H + /* * Opcode Masks for Tricore * Format MASK_OP_InstrFormatName_Field @@ -1467,3 +1470,5 @@ enum { OPC2_32_SYS_RESTORE =3D 0x0e, OPC2_32_SYS_FRET =3D 0x03, }; + +#endif diff --git a/tcg/tcg-gvec-desc.h b/tcg/tcg-gvec-desc.h index 2dda7d6ba1..0224ac3e78 100644 --- a/tcg/tcg-gvec-desc.h +++ b/tcg/tcg-gvec-desc.h @@ -17,6 +17,9 @@ * License along with this library; if not, see . */ =20 +#ifndef TCG_TCG_GVEC_DESC_H +#define TCG_TCG_GVEC_DESC_H + /* ??? These bit widths are set for ARM SVE, maxing out at 256 byte vector= s. */ #define SIMD_OPRSZ_SHIFT 0 #define SIMD_OPRSZ_BITS 5 @@ -47,3 +50,5 @@ static inline int32_t simd_data(uint32_t desc) { return sextract32(desc, SIMD_DATA_SHIFT, SIMD_DATA_BITS); } + +#endif diff --git a/tcg/tcg-op-gvec.h b/tcg/tcg-op-gvec.h index 2a9e0c7c0a..830d68f697 100644 --- a/tcg/tcg-op-gvec.h +++ b/tcg/tcg-op-gvec.h @@ -17,6 +17,9 @@ * License along with this library; if not, see . */ =20 +#ifndef TCG_TCG_OP_GVEC_H +#define TCG_TCG_OP_GVEC_H + /* * "Generic" vectors. All operands are given as offsets from ENV, * and therefore cannot also be allocated via tcg_global_mem_new_*. @@ -373,3 +376,5 @@ void tcg_gen_vec_shr8i_i64(TCGv_i64 d, TCGv_i64 a, int6= 4_t); void tcg_gen_vec_shr16i_i64(TCGv_i64 d, TCGv_i64 a, int64_t); void tcg_gen_vec_sar8i_i64(TCGv_i64 d, TCGv_i64 a, int64_t); void tcg_gen_vec_sar16i_i64(TCGv_i64 d, TCGv_i64 a, int64_t); + +#endif diff --git a/tests/crypto-tls-psk-helpers.h b/tests/crypto-tls-psk-helpers.h index 9aec29f1a0..966aacab76 100644 --- a/tests/crypto-tls-psk-helpers.h +++ b/tests/crypto-tls-psk-helpers.h @@ -18,6 +18,9 @@ * Author: Richard W.M. Jones */ =20 +#ifndef TESTS_CRYPTO_TLS_PSK_HELPERS_H +#define TESTS_CRYPTO_TLS_PSK_HELPERS_H + #include =20 #ifdef QCRYPTO_HAVE_TLS_TEST_SUPPORT @@ -27,3 +30,5 @@ void test_tls_psk_init(const char *keyfile); void test_tls_psk_cleanup(const char *keyfile); =20 #endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */ + +#endif diff --git a/tests/crypto-tls-x509-helpers.h b/tests/crypto-tls-x509-helper= s.h index 88c30d7c94..1c07607928 100644 --- a/tests/crypto-tls-x509-helpers.h +++ b/tests/crypto-tls-x509-helpers.h @@ -18,6 +18,9 @@ * Author: Daniel P. Berrange */ =20 +#ifndef TESTS_CRYPTO_TLS_X509_HELPERS_H +#define TESTS_CRYPTO_TLS_X509_HELPERS_H + #include #include =20 @@ -126,3 +129,5 @@ void test_tls_cleanup(const char *keyfile); extern const ASN1_ARRAY_TYPE pkix_asn1_tab[]; =20 #endif /* QCRYPTO_HAVE_TLS_TEST_SUPPORT */ + +#endif diff --git a/tests/libqos/virtio-9p.h b/tests/libqos/virtio-9p.h index dba22772b5..b54e89b3a1 100644 --- a/tests/libqos/virtio-9p.h +++ b/tests/libqos/virtio-9p.h @@ -16,6 +16,9 @@ * License along with this library; if not, see */ =20 +#ifndef TESTS_LIBQOS_VIRTIO_9P_H +#define TESTS_LIBQOS_VIRTIO_9P_H + #include "libqos/qgraph.h" #include "libqos/virtio.h" #include "libqos/virtio-pci.h" @@ -40,3 +43,5 @@ struct QVirtio9PDevice { QOSGraphObject obj; QVirtio9P v9p; }; + +#endif diff --git a/tests/libqos/virtio-balloon.h b/tests/libqos/virtio-balloon.h index e8066c42bb..52661cc87d 100644 --- a/tests/libqos/virtio-balloon.h +++ b/tests/libqos/virtio-balloon.h @@ -16,6 +16,9 @@ * License along with this library; if not, see */ =20 +#ifndef TESTS_LIBQOS_VIRTIO_BALLOON_H +#define TESTS_LIBQOS_VIRTIO_BALLOON_H + #include "libqos/qgraph.h" #include "libqos/virtio.h" #include "libqos/virtio-pci.h" @@ -37,3 +40,5 @@ struct QVirtioBalloonDevice { QOSGraphObject obj; QVirtioBalloon balloon; }; + +#endif diff --git a/tests/libqos/virtio-blk.h b/tests/libqos/virtio-blk.h index dc258496ba..c05adc659d 100644 --- a/tests/libqos/virtio-blk.h +++ b/tests/libqos/virtio-blk.h @@ -16,6 +16,9 @@ * License along with this library; if not, see */ =20 +#ifndef TESTS_LIBQOS_VIRTIO_BLK_H +#define TESTS_LIBQOS_VIRTIO_BLK_H + #include "libqos/qgraph.h" #include "libqos/virtio.h" #include "libqos/virtio-pci.h" @@ -38,3 +41,5 @@ struct QVirtioBlkDevice { QOSGraphObject obj; QVirtioBlk blk; }; + +#endif diff --git a/tests/libqos/virtio-net.h b/tests/libqos/virtio-net.h index 28238a1b20..a5697d7326 100644 --- a/tests/libqos/virtio-net.h +++ b/tests/libqos/virtio-net.h @@ -16,6 +16,9 @@ * License along with this library; if not, see */ =20 +#ifndef TESTS_LIBQOS_VIRTIO_NET_H +#define TESTS_LIBQOS_VIRTIO_NET_H + #include "libqos/qgraph.h" #include "libqos/virtio.h" #include "libqos/virtio-pci.h" @@ -39,3 +42,5 @@ struct QVirtioNetDevice { QOSGraphObject obj; QVirtioNet net; }; + +#endif diff --git a/tests/libqos/virtio-rng.h b/tests/libqos/virtio-rng.h index fbba988875..9e192f11f7 100644 --- a/tests/libqos/virtio-rng.h +++ b/tests/libqos/virtio-rng.h @@ -16,6 +16,9 @@ * License along with this library; if not, see */ =20 +#ifndef TESTS_LIBQOS_VIRTIO_RNG_H +#define TESTS_LIBQOS_VIRTIO_RNG_H + #include "libqos/qgraph.h" #include "libqos/virtio.h" #include "libqos/virtio-pci.h" @@ -37,3 +40,5 @@ struct QVirtioRngDevice { QOSGraphObject obj; QVirtioRng rng; }; + +#endif diff --git a/tests/libqos/virtio-scsi.h b/tests/libqos/virtio-scsi.h index 17a47beddc..4ca19a6a7a 100644 --- a/tests/libqos/virtio-scsi.h +++ b/tests/libqos/virtio-scsi.h @@ -16,6 +16,9 @@ * License along with this library; if not, see */ =20 +#ifndef TESTS_LIBQOS_VIRTIO_SCSI_H +#define TESTS_LIBQOS_VIRTIO_SCSI_H + #include "libqos/qgraph.h" #include "libqos/virtio.h" #include "libqos/virtio-pci.h" @@ -37,3 +40,5 @@ struct QVirtioSCSIDevice { QOSGraphObject obj; QVirtioSCSI scsi; }; + +#endif diff --git a/tests/libqos/virtio-serial.h b/tests/libqos/virtio-serial.h index b7e2a5d178..080fa8428d 100644 --- a/tests/libqos/virtio-serial.h +++ b/tests/libqos/virtio-serial.h @@ -16,6 +16,9 @@ * License along with this library; if not, see */ =20 +#ifndef TESTS_LIBQOS_VIRTIO_SERIAL_H +#define TESTS_LIBQOS_VIRTIO_SERIAL_H + #include "libqos/qgraph.h" #include "libqos/virtio.h" #include "libqos/virtio-pci.h" @@ -37,3 +40,5 @@ struct QVirtioSerialDevice { QOSGraphObject obj; QVirtioSerial serial; }; + +#endif diff --git a/tests/socket-helpers.h b/tests/socket-helpers.h index 1c07d6d656..9de0e6b151 100644 --- a/tests/socket-helpers.h +++ b/tests/socket-helpers.h @@ -15,9 +15,11 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, see . - * */ =20 +#ifndef TESTS_SOCKET_HELPERS_H +#define TESTS_SOCKET_HELPERS_H + /* * @hostname: a DNS name or numeric IP address * @@ -40,3 +42,5 @@ int socket_can_bind_connect(const char *hostname); * Returns 0 on success, -1 on fatal error */ int socket_check_protocol_support(bool *has_ipv4, bool *has_ipv6); + +#endif --=20 2.21.0 From nobody Fri May 3 08:41:57 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.47 as permitted sender) client-ip=209.51.188.47; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.47 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559917094; cv=none; d=zoho.com; s=zohoarc; b=kRSptw3pO4/TnGOMmXk6ctp72ltqWX5/XkbFHUesL1TIvY9ns1aSLhbvkXEeBNES6osOcsSqFlXXTqydjo1ZTdi7oLrvUdg13qwXJTexHm+HAc6w/kFkaTvp/Ct4ukNcVND1sTSYB2dBiDU1baf5TDuic471pzFROe/1JxL5BC8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559917094; h=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=xEhZnT3x0xnVY3NrZiqrfjnkv7gJdrnS/PbXISrIUo8=; b=YIvoM55AR3urV1rqjlQeOIaR91MiDjyOGyf24Qmns35Z/eBaI/W+C+XUKVyFMmIs+6CsJY71/kWnQsblDMF8CsNqxscPhMYPXAErt/kuUtDgmcBHXqb5tveUDt4+8rEZCP7SIyn57nbzPnYj9ja5nwSLGCMgQKN6MRZnH7b5PPw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.47 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.47]) by mx.zohomail.com with SMTPS id 155991709451532.17780406482814; Fri, 7 Jun 2019 07:18:14 -0700 (PDT) Received: from localhost ([::1]:51603 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZFh2-0002dR-Kl for importer@patchew.org; Fri, 07 Jun 2019 10:18:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51288) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZFci-0007kI-0C for qemu-devel@nongnu.org; Fri, 07 Jun 2019 10:13:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZFcg-000110-27 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 10:13:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53982) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hZFcd-0000Vv-UP for qemu-devel@nongnu.org; Fri, 07 Jun 2019 10:13:37 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F140830C31A4 for ; Fri, 7 Jun 2019 14:13:23 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-148.ams2.redhat.com [10.36.116.148]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C24247FE95 for ; Fri, 7 Jun 2019 14:13:22 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 533A211386A0; Fri, 7 Jun 2019 16:13:21 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Fri, 7 Jun 2019 16:13:21 +0200 Message-Id: <20190607141321.9726-1-armbru@redhat.com> In-Reply-To: <20190604181618.19980-1-armbru@redhat.com> References: <20190604181618.19980-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 07 Jun 2019 14:13:25 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 5/4] Clean up a header guard symbols (again) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Commit d52c454aad "contrib: add vhost-user-gpu" and "c68082c43a virtio-gpu: split virtio-gpu-pci & virtio-vga" created headers with unusual header guard symbols. Clean them up Signed-off-by: Markus Armbruster --- contrib/vhost-user-gpu/virgl.h | 5 +++-- contrib/vhost-user-gpu/vugbm.h | 5 +++-- contrib/vhost-user-gpu/vugpu.h | 5 +++-- hw/display/virtio-vga.h | 6 +++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/contrib/vhost-user-gpu/virgl.h b/contrib/vhost-user-gpu/virgl.h index f952bc9d4f..17078783a5 100644 --- a/contrib/vhost-user-gpu/virgl.h +++ b/contrib/vhost-user-gpu/virgl.h @@ -11,8 +11,9 @@ * This work is licensed under the terms of the GNU GPL, version 2 or late= r. * See the COPYING file in the top-level directory. */ -#ifndef VUGPU_VIRGL_H_ -#define VUGPU_VIRGL_H_ + +#ifndef VUGPU_VIRGL_H +#define VUGPU_VIRGL_H =20 #include "vugpu.h" =20 diff --git a/contrib/vhost-user-gpu/vugbm.h b/contrib/vhost-user-gpu/vugbm.h index c0bf27af9b..07e698fcd7 100644 --- a/contrib/vhost-user-gpu/vugbm.h +++ b/contrib/vhost-user-gpu/vugbm.h @@ -6,8 +6,9 @@ * This work is licensed under the terms of the GNU GPL, version 2 or late= r. * See the COPYING file in the top-level directory. */ -#ifndef VHOST_USER_GPU_GBM_H -#define VHOST_USER_GPU_GBM_H + +#ifndef VHOST_USER_GPU_VUGBM_H +#define VHOST_USER_GPU_VUGBM_H =20 #include "qemu/osdep.h" =20 diff --git a/contrib/vhost-user-gpu/vugpu.h b/contrib/vhost-user-gpu/vugpu.h index 458e92a1b3..3153c9a6de 100644 --- a/contrib/vhost-user-gpu/vugpu.h +++ b/contrib/vhost-user-gpu/vugpu.h @@ -11,8 +11,9 @@ * This work is licensed under the terms of the GNU GPL, version 2 or late= r. * See the COPYING file in the top-level directory. */ -#ifndef VUGPU_H_ -#define VUGPU_H_ + +#ifndef VUGPU_H +#define VUGPU_H =20 #include "qemu/osdep.h" =20 diff --git a/hw/display/virtio-vga.h b/hw/display/virtio-vga.h index c10bf390aa..c41281a010 100644 --- a/hw/display/virtio-vga.h +++ b/hw/display/virtio-vga.h @@ -1,5 +1,5 @@ -#ifndef VIRTIO_VGA_H_ -#define VIRTIO_VGA_H_ +#ifndef VIRTIO_VGA_H +#define VIRTIO_VGA_H =20 #include "hw/virtio/virtio-gpu-pci.h" #include "vga_int.h" @@ -29,4 +29,4 @@ typedef struct VirtIOVGABaseClass { DeviceReset parent_reset; } VirtIOVGABaseClass; =20 -#endif /* VIRTIO_VGA_H_ */ +#endif /* VIRTIO_VGA_H */ --=20 2.21.0