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 <armbru@redhat.com>
Message-Id: <
20190604181618.19980-2-armbru@redhat.com>
[Rebased with conflicts resolved automatically]
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
*/
-#include "ivgenpriv.h"
+#ifndef QCRYPTO_IVGEN_ESSIV_H
+#define QCRYPTO_IVGEN_ESSIV_H
-#ifndef QCRYPTO_IVGEN_ESSIV_H__
-#define QCRYPTO_IVGEN_ESSIV_H__
+#include "ivgenpriv.h"
extern struct QCryptoIVGenDriver qcrypto_ivgen_essiv;
-#endif /* QCRYPTO_IVGEN_ESSIV_H__ */
+#endif /* QCRYPTO_IVGEN_ESSIV_H */
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
*/
-#include "ivgenpriv.h"
-
#ifndef QCRYPTO_IVGEN_PLAIN_H__
#define QCRYPTO_IVGEN_PLAIN_H__
+#include "ivgenpriv.h"
+
extern struct QCryptoIVGenDriver qcrypto_ivgen_plain;
#endif /* QCRYPTO_IVGEN_PLAIN_H__ */
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
*/
-#include "ivgenpriv.h"
+#ifndef QCRYPTO_IVGEN_PLAIN64_H
+#define QCRYPTO_IVGEN_PLAIN64_H
-#ifndef QCRYPTO_IVGEN_PLAIN64_H__
-#define QCRYPTO_IVGEN_PLAIN64_H__
+#include "ivgenpriv.h"
extern struct QCryptoIVGenDriver qcrypto_ivgen_plain64;
-#endif /* QCRYPTO_IVGEN_PLAIN64_H__ */
+#endif /* QCRYPTO_IVGEN_PLAIN64_H */
-#ifndef ALLWINNER_H_
+#ifndef HW_ARM_ALLWINNER_A10_H
+#define HW_ARM_ALLWINNER_A10_H
#include "qemu/error-report.h"
#include "hw/char/serial.h"
MemoryRegion sram_a;
} AwA10State;
-#define ALLWINNER_H_
#endif
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#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"
# define OMAP_MPUI_REG_MASK 0x000007ff
-#endif /* hw_omap_h */
+#endif
*/
#ifndef XLNX_ZYNQMP_H
+#define XLNX_ZYNQMP_H
#include "hw/arm/boot.h"
#include "hw/intc/arm_gic.h"
bool has_rpu;
} XlnxZynqMPState;
-#define XLNX_ZYNQMP_H
#endif
*/
#ifndef CADENCE_UART_H
+#define CADENCE_UART_H
#include "hw/sysbus.h"
#include "chardev/char-fe.h"
return dev;
}
-#define CADENCE_UART_H
#endif
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
- *
*/
+#ifndef XLNX_DP_H
+#define XLNX_DP_H
+
#include "hw/sysbus.h"
#include "ui/console.h"
#include "hw/misc/auxbus.h"
#include "hw/dma/xlnx_dpdma.h"
#include "audio/audio.h"
-#ifndef XLNX_DP_H
-#define XLNX_DP_H
-
#define AUD_CHBUF_MAX_DEPTH (32 * KiB)
#define MAX_QEMU_BUFFER_SIZE (4 * KiB)
#define TYPE_XLNX_DP "xlnx.v-dp"
#define XLNX_DP(obj) OBJECT_CHECK(XlnxDPState, (obj), TYPE_XLNX_DP)
-#endif /* !XLNX_DP_H */
+#endif
*/
#ifndef XLNX_ZYNQ_DEVCFG_H
+#define XLNX_ZYNQ_DEVCFG_H
#include "hw/register.h"
#include "hw/sysbus.h"
RegisterInfo regs_info[XLNX_ZYNQ_DEVCFG_R_MAX];
} XlnxZynqDevcfg;
-#define XLNX_ZYNQ_DEVCFG_H
#endif
*/
#ifndef CADENCE_GEM_H
+#define CADENCE_GEM_H
#define TYPE_CADENCE_GEM "cadence_gem"
#define CADENCE_GEM(obj) OBJECT_CHECK(CadenceGEMState, (obj), TYPE_CADENCE_GEM)
bool sar_active[4];
} CadenceGEMState;
-#define CADENCE_GEM_H
#endif
+#ifndef WHP_DISPATCH_H
+#define WHP_DISPATCH_H
+
#include <windows.h>
#include <WinHvPlatform.h>
#include <WinHvEmulation.h>
-#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* WrittenSizeInBytes)) \
X(HRESULT, WHvCreatePartition, (WHV_PARTITION_HANDLE* Partition)) \
* more details.
*/
-#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
#define SPR_AUX_PERF_COUNT_0 0x2105
#define SPR_AUX_PERF_COUNT_1 0x2106
#define SPR_WATCH_MASK 0x200a
#define SPR_WATCH_VAL 0x200b
-#endif /* !defined(__ARCH_SPR_DEF_64_H__) */
-
-#endif /* !defined(__DOXYGEN__) */
+#endif
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
*/
-#include "io/channel.h"
+#ifndef TEST_IO_CHANNEL_HELPERS_H
+#define TEST_IO_CHANNEL_HELPERS_H
-#ifndef TEST_IO_CHANNEL_HELPERS
-#define TEST_IO_CHANNEL_HELPERS
+#include "io/channel.h"
typedef struct QIOChannelTest QIOChannelTest;
void qio_channel_test_validate(QIOChannelTest *test);
-#endif /* TEST_IO_CHANNEL_HELPERS */
+#endif /* TEST_IO_CHANNEL_HELPERS_H */