From 2b65f98538ed15c16b28885b1372bcbfeca6bdd6 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 25 Feb 2018 04:12:44 -0500 Subject: [PATCH] target-*: Clean up cpu.h header guards Most of them use guard symbols like CPU_$target_H, but we also have __MIPS_CPU_H__ and __TRICORE_CPU_H__. They all upset scripts/clean-header-guards.pl. The script dislikes CPU_$target_H because they don't match their file name (they should, to make guard collisions less likely). The others are reserved identifiers. Clean them all up: use guard symbol $target_CPU_H for target-$target/cpu.h. Backports commit 07f5a258750b3b9a6e10fd5ec3e29c9a943b650e from qemu --- qemu/target-arm/cpu.h | 5 +++-- qemu/target-i386/cpu.h | 5 +++-- qemu/target-m68k/cpu.h | 5 +++-- qemu/target-mips/cpu.h | 6 +++--- qemu/target-sparc/cpu.h | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/qemu/target-arm/cpu.h b/qemu/target-arm/cpu.h index 02143142..61bc321b 100644 --- a/qemu/target-arm/cpu.h +++ b/qemu/target-arm/cpu.h @@ -16,8 +16,9 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ -#ifndef CPU_ARM_H -#define CPU_ARM_H + +#ifndef ARM_CPU_H +#define ARM_CPU_H #include "config.h" diff --git a/qemu/target-i386/cpu.h b/qemu/target-i386/cpu.h index 0e21ffbc..753ea977 100644 --- a/qemu/target-i386/cpu.h +++ b/qemu/target-i386/cpu.h @@ -16,8 +16,9 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ -#ifndef CPU_I386_H -#define CPU_I386_H + +#ifndef I386_CPU_H +#define I386_CPU_H #include "config.h" #include "qemu-common.h" diff --git a/qemu/target-m68k/cpu.h b/qemu/target-m68k/cpu.h index 1f196633..e6d7dc19 100644 --- a/qemu/target-m68k/cpu.h +++ b/qemu/target-m68k/cpu.h @@ -17,8 +17,9 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see . */ -#ifndef CPU_M68K_H -#define CPU_M68K_H + +#ifndef M68K_CPU_H +#define M68K_CPU_H #define TARGET_LONG_BITS 32 diff --git a/qemu/target-mips/cpu.h b/qemu/target-mips/cpu.h index 757e3dd3..f3d6947e 100644 --- a/qemu/target-mips/cpu.h +++ b/qemu/target-mips/cpu.h @@ -1,5 +1,5 @@ -#if !defined (__MIPS_CPU_H__) -#define __MIPS_CPU_H__ +#ifndef MIPS_CPU_H +#define MIPS_CPU_H //#define DEBUG_OP @@ -1064,4 +1064,4 @@ static inline void QEMU_NORETURN do_raise_exception(CPUMIPSState *env, do_raise_exception_err(env, exception, 0, pc); } -#endif /* !defined (__MIPS_CPU_H__) */ +#endif /* MIPS_CPU_H */ diff --git a/qemu/target-sparc/cpu.h b/qemu/target-sparc/cpu.h index 1a2620b8..29aa9090 100644 --- a/qemu/target-sparc/cpu.h +++ b/qemu/target-sparc/cpu.h @@ -1,5 +1,5 @@ -#ifndef CPU_SPARC_H -#define CPU_SPARC_H +#ifndef SPARC_CPU_H +#define SPARC_CPU_H #include "config.h" #include "qemu-common.h"