mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Enforce a standard header file guard symbol name
Require that all headers are guarded by a symbol named LIBVIRT_$FILENAME where $FILENAME is the uppercased filename, with all characters outside a-z changed into '_'. Note we do not use a leading __ because that is technically a namespace reserved for the toolchain. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -38,9 +38,8 @@
|
||||
#if WITH_QEMU && WITH_YAJL
|
||||
# include "testutilsqemu.h"
|
||||
# include "qemumonitortestutils.h"
|
||||
# define __QEMU_CAPSPRIV_H_ALLOW__
|
||||
# define LIBVIRT_QEMU_CAPSPRIV_H_ALLOW
|
||||
# include "qemu/qemu_capspriv.h"
|
||||
# undef __QEMU_CAPSPRIV_H_ALLOW__
|
||||
#endif
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_CPU
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
# include "network/bridge_driver_platform.h"
|
||||
# include "virbuffer.h"
|
||||
|
||||
# define __VIR_FIREWALL_PRIV_H_ALLOW__
|
||||
# define LIBVIRT_VIRFIREWALLPRIV_H_ALLOW
|
||||
# include "virfirewallpriv.h"
|
||||
|
||||
# define __VIR_COMMAND_PRIV_H_ALLOW__
|
||||
# define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW
|
||||
# include "vircommandpriv.h"
|
||||
|
||||
# define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
#include "virbuffer.h"
|
||||
#include "virfirewall.h"
|
||||
|
||||
#define __VIR_FIREWALL_PRIV_H_ALLOW__
|
||||
#define LIBVIRT_VIRFIREWALLPRIV_H_ALLOW
|
||||
#include "virfirewallpriv.h"
|
||||
|
||||
#define __VIR_COMMAND_PRIV_H_ALLOW__
|
||||
#define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW
|
||||
#include "vircommandpriv.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
# include "nwfilter/nwfilter_ebiptables_driver.h"
|
||||
# include "virbuffer.h"
|
||||
|
||||
# define __VIR_FIREWALL_PRIV_H_ALLOW__
|
||||
# define LIBVIRT_VIRFIREWALLPRIV_H_ALLOW
|
||||
# include "virfirewallpriv.h"
|
||||
|
||||
# define __VIR_COMMAND_PRIV_H_ALLOW__
|
||||
# define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW
|
||||
# include "vircommandpriv.h"
|
||||
|
||||
# define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#include "testutils.h"
|
||||
#include "testutilsqemu.h"
|
||||
#include "qemumonitortestutils.h"
|
||||
#define __QEMU_CAPSPRIV_H_ALLOW__
|
||||
#define LIBVIRT_QEMU_CAPSPRIV_H_ALLOW
|
||||
#include "qemu/qemu_capspriv.h"
|
||||
#define __QEMU_MONITOR_PRIV_H_ALLOW__
|
||||
#define LIBVIRT_QEMU_MONITOR_PRIV_H_ALLOW
|
||||
#include "qemu/qemu_monitor_priv.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "virarch.h"
|
||||
#include "virthread.h"
|
||||
#include "qemu/qemu_capabilities.h"
|
||||
#define __QEMU_CAPSPRIV_H_ALLOW__ 1
|
||||
#define LIBVIRT_QEMU_CAPSPRIV_H_ALLOW
|
||||
#include "qemu/qemu_capspriv.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
@@ -20,9 +20,8 @@
|
||||
#include "conf/cpu_conf.h"
|
||||
#include "cpu/cpu.h"
|
||||
#include "qemu/qemu_capabilities.h"
|
||||
#define __QEMU_CAPSPRIV_H_ALLOW__
|
||||
#define LIBVIRT_QEMU_CAPSPRIV_H_ALLOW
|
||||
#include "qemu/qemu_capspriv.h"
|
||||
#undef __QEMU_CAPSPRIV_H_ALLOW__
|
||||
#include "testutilshostcpus.h"
|
||||
#include "virarch.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "qemu/qemu_alias.h"
|
||||
#include "qemu/qemu_conf.h"
|
||||
#include "qemu/qemu_hotplug.h"
|
||||
#define __QEMU_HOTPLUGPRIV_H_ALLOW__
|
||||
#define LIBVIRT_QEMU_HOTPLUGPRIV_H_ALLOW
|
||||
#include "qemu/qemu_hotplugpriv.h"
|
||||
#include "qemumonitortestutils.h"
|
||||
#include "testutils.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "testutilsqemu.h"
|
||||
#include "qemumonitortestutils.h"
|
||||
#include "qemu/qemu_migration_params.h"
|
||||
#define __QEMU_MIGRATION_PARAMSPRIV_H_ALLOW__
|
||||
#define LIBVIRT_QEMU_MIGRATION_PARAMSPRIV_H_ALLOW
|
||||
#include "qemu/qemu_migration_paramspriv.h"
|
||||
#include "qemu/qemu_monitor.h"
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "cpu/cpu.h"
|
||||
#include "qemu/qemu_monitor.h"
|
||||
#include "qemu/qemu_migration_params.h"
|
||||
#define __QEMU_MIGRATION_PARAMSPRIV_H_ALLOW__
|
||||
#define LIBVIRT_QEMU_MIGRATION_PARAMSPRIV_H_ALLOW
|
||||
#include "qemu/qemu_migration_paramspriv.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "qemumonitortestutils.h"
|
||||
|
||||
#include "virthread.h"
|
||||
#define __QEMU_PROCESS_PRIV_H_ALLOW__
|
||||
#define LIBVIRT_QEMU_PROCESSPRIV_H_ALLOW
|
||||
#include "qemu/qemu_processpriv.h"
|
||||
#include "qemu/qemu_monitor.h"
|
||||
#include "qemu/qemu_agent.h"
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __VIR_QEMU_MONITOR_TEST_UTILS_H__
|
||||
# define __VIR_QEMU_MONITOR_TEST_UTILS_H__
|
||||
#ifndef LIBVIRT_QEMUMONITORTESTUTILS_H
|
||||
# define LIBVIRT_QEMUMONITORTESTUTILS_H
|
||||
|
||||
# include "domain_conf.h"
|
||||
# include "qemu/qemu_conf.h"
|
||||
@@ -101,4 +101,4 @@ qemuMonitorPtr qemuMonitorTestGetMonitor(qemuMonitorTestPtr test);
|
||||
qemuAgentPtr qemuMonitorTestGetAgent(qemuMonitorTestPtr test);
|
||||
virDomainObjPtr qemuMonitorTestGetDomainObj(qemuMonitorTestPtr test);
|
||||
|
||||
#endif /* __VIR_QEMU_MONITOR_TEST_UTILS_H__ */
|
||||
#endif /* LIBVIRT_QEMUMONITORTESTUTILS_H */
|
||||
|
||||
@@ -24,9 +24,8 @@
|
||||
# include "storage/storage_driver.h"
|
||||
# include "virmock.h"
|
||||
|
||||
# define __QEMU_CAPSPRIV_H_ALLOW__
|
||||
# define LIBVIRT_QEMU_CAPSPRIV_H_ALLOW
|
||||
# include "qemu/qemu_capspriv.h"
|
||||
# undef __QEMU_CAPSPRIV_H_ALLOW__
|
||||
|
||||
# include "testutilsqemu.h"
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "internal.h"
|
||||
#include "testutils.h"
|
||||
#define __VIR_STORAGE_BACKEND_SHEEPDOG_PRIV_ALLOW_H__
|
||||
#define LIBVIRT_STORAGE_BACKEND_SHEEPDOG_PRIV_H_ALLOW
|
||||
#include "storage/storage_backend_sheepdog_priv.h"
|
||||
#include "virstring.h"
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "virfile.h"
|
||||
#include "virstring.h"
|
||||
|
||||
#define __VIR_SYSINFO_PRIV_H_ALLOW__
|
||||
#define LIBVIRT_VIRSYSINFOPRIV_H_ALLOW
|
||||
#include "virsysinfopriv.h"
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
* Karel Zak <kzak@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __VIR_TEST_UTILS_H__
|
||||
# define __VIR_TEST_UTILS_H__
|
||||
#ifndef LIBVIRT_TESTUTILS_H
|
||||
# define LIBVIRT_TESTUTILS_H
|
||||
|
||||
# include "viralloc.h"
|
||||
# include "virfile.h"
|
||||
@@ -166,4 +166,4 @@ int testCompareDomXML2XMLFiles(virCapsPtr caps,
|
||||
unsigned int parseFlags,
|
||||
testCompareDomXML2XMLResult expectResult);
|
||||
|
||||
#endif /* __VIR_TEST_UTILS_H__ */
|
||||
#endif /* LIBVIRT_TESTUTILS_H */
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TESTUTILSHOSTCPUS_H
|
||||
# define TESTUTILSHOSTCPUS_H
|
||||
#ifndef LIBVIRT_TESTUTILSHOSTCPUS_H
|
||||
# define LIBVIRT_TESTUTILSHOSTCPUS_H
|
||||
|
||||
# include "conf/cpu_conf.h"
|
||||
# include "internal.h"
|
||||
@@ -166,4 +166,4 @@ testUtilsHostCpusGetDefForArch(virArch arch)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* TESTUTILSHOSTCPUS_H */
|
||||
#endif /* LIBVIRT_TESTUTILSHOSTCPUS_H */
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TESTUTILSLXC_H
|
||||
# define TESTUTILSLXC_H
|
||||
#ifndef LIBVIRT_TESTUTILSLXC_H
|
||||
# define LIBVIRT_TESTUTILSLXC_H
|
||||
|
||||
# include "capabilities.h"
|
||||
|
||||
@@ -24,4 +24,4 @@
|
||||
|
||||
virCapsPtr testLXCCapsInit(void);
|
||||
|
||||
#endif /* TESTUTILSLXC_H */
|
||||
#endif /* LIBVIRT_TESTUTILSLXC_H */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# include "cpu_conf.h"
|
||||
# include "qemu/qemu_driver.h"
|
||||
# include "qemu/qemu_domain.h"
|
||||
# define __QEMU_CAPSPRIV_H_ALLOW__
|
||||
# define LIBVIRT_QEMU_CAPSPRIV_H_ALLOW
|
||||
# include "qemu/qemu_capspriv.h"
|
||||
# include "virstring.h"
|
||||
# include "virfilecache.h"
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TESTUTILSQEMU_H
|
||||
# define TESTUTILSQEMU_H
|
||||
#ifndef LIBVIRT_TESTUTILSQEMU_H
|
||||
# define LIBVIRT_TESTUTILSQEMU_H
|
||||
|
||||
# ifdef WITH_QEMU
|
||||
|
||||
@@ -65,4 +65,4 @@ char *testQemuGetLatestCapsForArch(const char *dirname,
|
||||
|
||||
# endif
|
||||
|
||||
#endif /* TESTUTILSQEMU_H */
|
||||
#endif /* LIBVIRT_TESTUTILSQEMU_H */
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __TESTUTILSQEMUSCHEMA_H__
|
||||
# define __TESTUTILSQEMUSCHEMA_H__
|
||||
#ifndef LIBVIRT_TESTUTILSQEMUSCHEMA_H
|
||||
# define LIBVIRT_TESTUTILSQEMUSCHEMA_H
|
||||
|
||||
# include "virhash.h"
|
||||
# include "virjson.h"
|
||||
@@ -35,4 +35,4 @@ testQEMUSchemaGetLatest(void);
|
||||
virHashTablePtr
|
||||
testQEMUSchemaLoad(void);
|
||||
|
||||
#endif /* __TESTUTILSQEMUSCHEMA_H__ */
|
||||
#endif /* LIBVIRT_TESTUTILSQEMUSCHEMA_H */
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _TESTUTILSXEN_H_
|
||||
# define _TESTUTILSXEN_H_
|
||||
#ifndef LIBVIRT_TESTUTILSXEN_H
|
||||
# define LIBVIRT_TESTUTILSXEN_H
|
||||
|
||||
# include "capabilities.h"
|
||||
# ifdef WITH_LIBXL
|
||||
@@ -24,4 +24,4 @@
|
||||
|
||||
virCapsPtr testXLInitCaps(void);
|
||||
|
||||
#endif /* _TESTUTILSXEN_H_ */
|
||||
#endif /* LIBVIRT_TESTUTILSXEN_H */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifdef __linux__
|
||||
|
||||
|
||||
# define __VIR_CGROUP_ALLOW_INCLUDE_PRIV_H__
|
||||
# define LIBVIRT_VIRCGROUPPRIV_H_ALLOW
|
||||
# include "vircgrouppriv.h"
|
||||
# include "virstring.h"
|
||||
# include "virerror.h"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#define __VIR_DBUS_PRIV_H_ALLOW__
|
||||
#define LIBVIRT_VIRDBUSPRIV_H_ALLOW
|
||||
#include "virdbuspriv.h"
|
||||
#include "virlog.h"
|
||||
#include "testutils.h"
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __VIR_FILE_MOCK_H__
|
||||
# define __VIR_FILE_MOCK_H__
|
||||
#ifndef LIBVIRT_VIRFILEWRAPPER_H
|
||||
# define LIBVIRT_VIRFILEWRAPPER_H
|
||||
|
||||
int
|
||||
virFileWrapperAddPrefix(const char *prefix,
|
||||
@@ -29,4 +29,4 @@ virFileWrapperRemovePrefix(const char *prefix);
|
||||
void
|
||||
virFileWrapperClearPrefixes(void);
|
||||
|
||||
#endif /* __VIR_FILE_MOCK_H__ */
|
||||
#endif /* LIBVIRT_VIRFILEWRAPPER_H */
|
||||
|
||||
@@ -18,18 +18,17 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#define __VIR_FIREWALL_PRIV_H_ALLOW__
|
||||
#define __VIR_COMMAND_PRIV_H_ALLOW__
|
||||
#define __VIR_DBUS_PRIV_H_ALLOW__
|
||||
|
||||
#include "testutils.h"
|
||||
|
||||
#if defined(__linux__)
|
||||
|
||||
# include "virbuffer.h"
|
||||
# define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW
|
||||
# include "vircommandpriv.h"
|
||||
# define LIBVIRT_VIRFIREWALLPRIV_H_ALLOW
|
||||
# include "virfirewallpriv.h"
|
||||
# include "virmock.h"
|
||||
# define LIBVIRT_VIRDBUSPRIV_H_ALLOW
|
||||
# include "virdbuspriv.h"
|
||||
|
||||
# define VIR_FROM_THIS VIR_FROM_FIREWALL
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef VIRHASHDATA_H
|
||||
# define VIRHASHDATA_H
|
||||
#ifndef LIBVIRT_VIRHASHDATA_H
|
||||
# define LIBVIRT_VIRHASHDATA_H
|
||||
|
||||
const char *uuids[] = {
|
||||
/* [ 2] */ "a9b02f96-e430-4f7c-a7ff-a647d080447a",
|
||||
@@ -284,4 +284,4 @@ const char *uuids_new[] = {
|
||||
"53c215dd-bdba-4fdc-887a-86ab6f860df4",
|
||||
};
|
||||
|
||||
#endif /* VIRHASHDATA_H */
|
||||
#endif /* LIBVIRT_VIRHASHDATA_H */
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "testutils.h"
|
||||
#include "internal.h"
|
||||
#define __VIR_HOSTCPU_PRIV_H_ALLOW__
|
||||
#define LIBVIRT_VIRHOSTCPUPRIV_H_ALLOW
|
||||
#include "virhostcpupriv.h"
|
||||
#include "virfile.h"
|
||||
#include "virstring.h"
|
||||
|
||||
@@ -27,8 +27,7 @@ main(void)
|
||||
return EXIT_AM_SKIP;
|
||||
}
|
||||
#else
|
||||
# define __VIR_COMMAND_PRIV_H_ALLOW__
|
||||
|
||||
# define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW
|
||||
# include "vircommandpriv.h"
|
||||
# include "viriscsi.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
# define __VIR_COMMAND_PRIV_H_ALLOW__
|
||||
# define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW
|
||||
# include "vircommandpriv.h"
|
||||
# include "virkmod.h"
|
||||
# include "virstring.h"
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __VIR_MOCK_H__
|
||||
# define __VIR_MOCK_H__
|
||||
#ifndef LIBVIRT_VIRMOCK_H
|
||||
# define LIBVIRT_VIRMOCK_H
|
||||
|
||||
# if HAVE_DLFCN_H
|
||||
# include <dlfcn.h>
|
||||
@@ -300,4 +300,4 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif /* __VIR_MOCK_H__ */
|
||||
#endif /* LIBVIRT_VIRMOCK_H */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "testutils.h"
|
||||
#define __VIR_COMMAND_PRIV_H_ALLOW__
|
||||
#define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW
|
||||
#include "vircommandpriv.h"
|
||||
#include "virnetdevbandwidth.h"
|
||||
#include "netdev_bandwidth_conf.c"
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
* <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef VIRNETTLSHELPERS_H
|
||||
# define VIRNETTLSHELPERS_H
|
||||
#ifndef LIBVIRT_VIRNETTLSHELPERS_H
|
||||
# define LIBVIRT_VIRNETTLSHELPERS_H
|
||||
|
||||
# include <gnutls/gnutls.h>
|
||||
# include <gnutls/x509.h>
|
||||
@@ -79,4 +79,4 @@ void testTLSCleanup(const char *keyfile);
|
||||
|
||||
# endif
|
||||
|
||||
#endif /* VIRNETTLSHELPERS_H */
|
||||
#endif /* LIBVIRT_VIRNETTLSHELPERS_H */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "testutils.h"
|
||||
#include "virfilewrapper.h"
|
||||
#define __VIR_RESCTRL_PRIV_H_ALLOW__
|
||||
#define LIBVIRT_VIRRESCTRLPRIV_H_ALLOW
|
||||
#include "virresctrlpriv.h"
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
# include <dbus/dbus.h>
|
||||
|
||||
# define __VIR_SYSTEMD_PRIV_H_ALLOW__ 1
|
||||
# define LIBVIRT_VIRSYSTEMDPRIV_H_ALLOW
|
||||
# include "virsystemdpriv.h"
|
||||
|
||||
# include "virsystemd.h"
|
||||
|
||||
Reference in New Issue
Block a user