Do conditional driver config in Makefile.am, not source files

This commit is contained in:
Daniel P. Berrange 2008-08-20 20:48:35 +00:00
parent 6334cd16df
commit bb16f4a25d
42 changed files with 1514 additions and 1579 deletions

View File

@ -1,4 +1,22 @@
Wed Aug 20 42:42:09 BST 2008 Daniel P. Berrange <berrange@redhat.com>
Wed Aug 20 21:05:09 BST 2008 Daniel P. Berrange <berrange@redhat.com>
* configure.in, qemud/Makefile.am, src/Makefile.am: Use automake
conditions when deciding which files to include in build
* src/bridge.c, src/bridge.h, src/conf.h, src/console.h,
src/driver.h, src/hash.h, src/internal.h, src/libvirt.c,
src/lxc_conf.c, src/lxc_conf.h, src/lxc_container.c,
src/lxc_container.h, src/lxc_driver.c, src/lxc_driver.h,
src/nodeinfo.h, src/openvz_conf.c, src/openvz_driver.c,
src/proxy_internal.c, src/proxy_internal.h, src/qemu_conf.c,
src/qemu_conf.h, src/qemu_driver.c, src/qemu_driver.h,
src/remote_internal.h, src/test.c, src/test.h, src/veth.c,
src/xen_internal.c, src/xen_internal.h, src/xen_unified.c,
src/xen_unified.h, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xs_internal.c, src/xs_internal.h
tests/testutils.h: Remove preprocessor conditions for driver
compilation. Remove unneccessary "extern C" declarations.
Wed Aug 20 20:42:09 BST 2008 Daniel P. Berrange <berrange@redhat.com>
* src/util.c, src/util.h: Add convenience APIs for stripping
a file extension

View File

@ -245,24 +245,32 @@ WITH_XEN=0
if test "$with_openvz" = "yes"; then
LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_OPENVZ"
fi
AM_CONDITIONAL([WITH_OPENVZ], [test "$with_openvz" = "yes"])
if test "$with_lxc" = "yes" ; then
LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_LXC"
fi
AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
if test "$with_qemu" = "yes" ; then
LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_QEMU"
fi
AM_CONDITIONAL([WITH_QEMU], [test "$with_qemu" = "yes"])
if test "$with_test" = "yes" ; then
LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_TEST"
fi
AM_CONDITIONAL([WITH_TEST], [test "$with_test" = "yes"])
if test "$with_remote" = "yes" ; then
LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_REMOTE"
fi
AM_CONDITIONAL([WITH_REMOTE], [test "$with_remote" = "yes"])
if test "$with_libvirtd" = "yes" ; then
LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_LIBVIRTD"
fi
AM_CONDITIONAL([WITH_LIBVIRTD], [test "$with_libvirtd" = "yes"])
if test "$with_xen" = "yes" ; then
dnl search for the Xen store library
@ -295,11 +303,12 @@ if test "$with_xen" = "yes" ; then
#include <xen/xen.h>
])
fi
AM_CONDITIONAL([WITH_XEN], [test "$WITH_XEN" = "1"])
dnl
dnl check for kernel headers required by qemud/bridge.c
dnl check for kernel headers required by src/bridge.c
dnl
if test "$with_qemu" = "yes" ; then
if test "$with_qemu" = "yes" -o "$with_lxc" = "yes" ; then
AC_CHECK_HEADERS([linux/param.h linux/sockios.h linux/if_bridge.h linux/if_tun.h],,
AC_MSG_ERROR([You must install kernel-headers in order to compile libvirt]))
fi

File diff suppressed because it is too large Load Diff

View File

@ -2,19 +2,30 @@
INCLUDES = $(LIBVIRT_FEATURES)
# Distribute the generated files so that rpcgen isn't required on the
# target machine (although almost any Unix machine will have it).
EXTRA_DIST = libvirtd.init.in libvirtd.sysconf default-network.xml \
remote_protocol.x \
remote_protocol.c remote_protocol.h \
remote_generate_stubs.pl rpcgen_fix.pl \
DAEMON_SOURCES = \
event.c event.h \
qemud.c qemud.h \
remote.c \
remote_dispatch_prototypes.h \
remote_dispatch_localvars.h \
remote_dispatch_proc_switch.h \
mdns.c mdns.h \
libvirtd.sasl \
remote_protocol.h remote_protocol.c \
$(srcdir)/../src/util-lib.c
AVAHI_SOURCES = \
mdns.c mdns.h
EXTRA_DIST = \
default-network.xml \
remote_generate_stubs.pl rpcgen_fix.pl \
remote_protocol.x \
libvirtd.conf \
libvirtd.policy
libvirtd.init.in \
libvirtd.policy \
libvirtd.sasl \
libvirtd.sysconf \
$(AVAHI_SOURCES) \
$(DAEMON_SOURCES)
if RPCGEN
SUFFIXES = .x
@ -45,12 +56,7 @@ sbin_PROGRAMS = libvirtd
confdir = $(sysconfdir)/libvirt/
conf_DATA = libvirtd.conf
libvirtd_SOURCES = \
qemud.c qemud.h \
remote_protocol.h remote_protocol.c \
remote.c \
$(srcdir)/../src/util-lib.c \
event.c event.h
libvirtd_SOURCES = $(DAEMON_SOURCES)
#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
libvirtd_CFLAGS = \
@ -79,7 +85,7 @@ policydir = $(datadir)/PolicyKit/policy
endif
if HAVE_AVAHI
libvirtd_SOURCES += mdns.c mdns.h
libvirtd_SOURCES += $(AVAHI_SOURCES)
libvirtd_CFLAGS += $(AVAHI_CFLAGS)
libvirtd_LDADD += $(AVAHI_LIBS)
endif

View File

@ -30,80 +30,176 @@ EXTRA_DIST = libvirt_sym.version $(conf_DATA)
lib_LTLIBRARIES = libvirt.la
CLIENT_SOURCES = \
libvirt.c internal.h \
gnutls_1_0_compat.h \
socketcompat.h \
memory.c memory.h \
hash.c hash.h \
test.c test.h \
buf.c buf.h \
qparams.c qparams.h \
domain_conf.c domain_conf.h \
capabilities.c capabilities.h \
xml.c xml.h \
event.c event.h \
xen_unified.c xen_unified.h \
xen_internal.c xen_internal.h \
xs_internal.c xs_internal.h \
xend_internal.c xend_internal.h \
stats_linux.c stats_linux.h \
sexpr.c sexpr.h \
virterror.c \
driver.h \
proxy_internal.c proxy_internal.h \
conf.c conf.h \
network_conf.c network_conf.h \
xm_internal.c xm_internal.h \
remote_internal.c remote_internal.h \
# These files are not related to driver APIs. Simply generic
# helper APIs for various purposes
GENERIC_LIB_SOURCES = \
bridge.c bridge.h \
buf.c buf.h \
conf.c conf.h \
event.c event.h \
iptables.c iptables.h \
memory.c memory.h \
qparams.c qparams.h \
stats_linux.c stats_linux.h \
uuid.c uuid.h \
qemu_driver.c qemu_driver.h \
qemu_conf.c qemu_conf.h \
openvz_conf.c openvz_conf.h \
openvz_driver.c openvz_driver.h \
lxc_driver.c lxc_driver.h \
lxc_controller.c lxc_controller.h \
util.c util.h \
virterror.c \
xml.c xml.h
# Domain driver generic impl APIs
DOMAIN_CONF_SOURCES = \
capabilities.c capabilities.h \
domain_conf.c domain_conf.h \
nodeinfo.h nodeinfo.c
# Network driver generic impl APIs
NETWORK_CONF_SOURCES = \
network_conf.c network_conf.h
# Storage driver generic impl APIs
STORAGE_CONF_SOURCES = \
storage_conf.h storage_conf.c
# The remote RPC driver, covering domains, storage, networks, etc
REMOTE_DRIVER_SOURCES = \
gnutls_1_0_compat.h \
remote_internal.c remote_internal.h \
../qemud/remote_protocol.c \
../qemud/remote_protocol.h \
socketcompat.h
# Mock driver, covering domains, storage, networks, etc
TEST_DRIVER_SOURCES = \
test.c test.h
# Now the Hypervisor specific drivers
XEN_DRIVER_SOURCES = \
proxy_internal.c proxy_internal.h \
sexpr.c sexpr.h \
xen_internal.c xen_internal.h \
xen_unified.c xen_unified.h \
xend_internal.c xend_internal.h \
xm_internal.c xm_internal.h \
xs_internal.c xs_internal.h
LXC_DRIVER_SOURCES = \
lxc_conf.c lxc_conf.h \
lxc_container.c lxc_container.h \
veth.c veth.h \
nodeinfo.h nodeinfo.c \
util.c util.h
lxc_controller.c lxc_controller.h \
lxc_driver.c lxc_driver.h \
veth.c veth.h
SERVER_SOURCES = \
../qemud/remote_protocol.c ../qemud/remote_protocol.h
OPENVZ_DRIVER_SOURCES = \
openvz_conf.c openvz_conf.h \
openvz_driver.c openvz_driver.h
if WITH_LIBVIRTD
# XXX network driver should be split out of this
QEMU_DRIVER_SOURCES = \
qemu_conf.c qemu_conf.h \
qemu_driver.c qemu_driver.h
CLIENT_SOURCES += \
storage_conf.h storage_conf.c \
# And finally storage backend specific impls
STORAGE_DRIVER_SOURCES = \
storage_driver.h storage_driver.c \
storage_backend.h storage_backend.c \
storage_backend.h storage_backend.c
STORAGE_DRIVER_FS_SOURCES = \
storage_backend_fs.h storage_backend_fs.c
STORAGE_DRIVER_LVM_SOURCES = \
storage_backend_logical.h \
storage_backend_logical.c
STORAGE_DRIVER_ISCSI_SOURCES = \
storage_backend_iscsi.h storage_backend_iscsi.c
STORAGE_DRIVER_DISK_SOURCES = \
storage_backend_disk.h storage_backend_disk.c
STORAGE_HELPER_DISK_SOURCES = \
parthelper.c
#########################
#
# Build up list of libvirt.la source files based on configure conditions
#
# First deal with sources usable in non-daemon context
libvirt_la_SOURCES = \
driver.h \
hash.c hash.h \
internal.h \
libvirt.c \
$(GENERIC_LIB_SOURCES) \
$(DOMAIN_CONF_SOURCES) \
$(NETWORK_CONF_SOURCES) \
$(STORAGE_CONF_SOURCES)
# Drivers usable outside daemon context
if WITH_TEST
libvirt_la_SOURCES += $(TEST_DRIVER_SOURCES)
endif
if WITH_REMOTE
libvirt_la_SOURCES += $(REMOTE_DRIVER_SOURCES)
endif
if WITH_XEN
libvirt_la_SOURCES += $(XEN_DRIVER_SOURCES)
endif
# Drivers usable inside daemon context
if WITH_LIBVIRTD
libvirt_la_SOURCES += $(STORAGE_DRIVER_SOURCES)
libvirt_la_SOURCES += $(STORAGE_DRIVER_FS_SOURCES)
if WITH_QEMU
libvirt_la_SOURCES += $(QEMU_DRIVER_SOURCES)
endif
if WITH_LXC
libvirt_la_SOURCES += $(LXC_DRIVER_SOURCES)
endif
if WITH_OPENVZ
libvirt_la_SOURCES += $(OPENVZ_DRIVER_SOURCES)
endif
if WITH_STORAGE_LVM
CLIENT_SOURCES += storage_backend_logical.h storage_backend_logical.c
else
EXTRA_DIST += storage_backend_logical.h storage_backend_logical.c
libvirt_la_SOURCES += $(STORAGE_DRIVER_LVM_SOURCES)
endif
if WITH_STORAGE_ISCSI
CLIENT_SOURCES += storage_backend_iscsi.h storage_backend_iscsi.c
else
EXTRA_DIST += storage_backend_iscsi.h storage_backend_iscsi.c
libvirt_la_SOURCES += $(STORAGE_DRIVER_ISCSI_SOURCES)
endif
if WITH_STORAGE_DISK
CLIENT_SOURCES += storage_backend_disk.h storage_backend_disk.c
else
EXTRA_DIST += storage_backend_disk.h storage_backend_disk.c
libvirt_la_SOURCES += $(STORAGE_DRIVER_DISK_SOURCES)
endif
endif
endif
# Add all conditional sources just in case...
EXTRA_DIST += \
$(TEST_DRIVER_SOURCES) \
$(REMOTE_DRIVER_SOURCES) \
$(XEN_DRIVER_SOURCES) \
$(QEMU_DRIVER_SOURCES) \
$(LXC_DRIVER_SOURCES) \
$(OPENVZ_DRIVER_SOURCES) \
$(STORAGE_DRIVER_SOURCES) \
$(STORAGE_DRIVER_FS_SOURCES) \
$(STORAGE_DRIVER_LVM_SOURCES) \
$(STORAGE_DRIVER_ISCSI_SOURCES) \
$(STORAGE_DRIVER_DISK_SOURCES)
libvirt_la_SOURCES = $(CLIENT_SOURCES) $(SERVER_SOURCES)
libvirt_la_LIBADD = $(LIBXML_LIBS) $(GNUTLS_LIBS) $(SASL_LIBS) $(SELINUX_LIBS) \
$(NUMACTL_LIBS) \
@CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la
@ -134,7 +230,11 @@ libvirt_test_la_CFLAGS = $(COVERAGE_CFLAGS)
bin_PROGRAMS = virsh
virsh_SOURCES = virsh.c console.c console.h util-lib.c util-lib.h
virsh_SOURCES = \
console.c console.h \
util-lib.c util-lib.h \
virsh.c
virsh_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDFLAGS)
virsh_DEPENDENCIES = $(DEPS)
virsh_LDADD = $(LDADDS) $(VIRSH_LIBS)
@ -176,14 +276,14 @@ if WITH_STORAGE_DISK
if WITH_LIBVIRTD
libexec_PROGRAMS = libvirt_parthelper
libvirt_parthelper_SOURCES = parthelper.c
libvirt_parthelper_SOURCES = $(STORAGE_HELPER_DISK_SOURCES)
libvirt_parthelper_LDFLAGS = $(WARN_CFLAGS) $(COVERAGE_LDCFLAGS)
libvirt_parthelper_LDADD = $(LIBPARTED_LIBS)
libvirt_parthelper_CFLAGS = $(LIBPARTED_CFLAGS)
endif
else
EXTRA_DIST += parthelper.c
endif
EXTRA_DIST += $(STORAGE_HELPER_DISK_SOURCES)
# Create the /var/cache/libvirt directory when installing.
install-exec-local:

View File

@ -21,7 +21,7 @@
#include <config.h>
#ifdef WITH_QEMU
#if defined(WITH_QEMU) || defined(WITH_LXC)
#include "bridge.h"
@ -750,4 +750,4 @@ brSetEnableSTP(brControl *ctl ATTRIBUTE_UNUSED,
return retval;
}
#endif /* WITH_QEMU */
#endif /* WITH_QEMU || WITH_LXC */

View File

@ -24,7 +24,7 @@
#include <config.h>
#ifdef WITH_QEMU
#if defined(WITH_QEMU) || defined(WITH_LXC)
#include <net/if.h>
#include <netinet/in.h>
@ -98,6 +98,6 @@ int brGetEnableSTP (brControl *ctl,
const char *bridge,
int *enable);
#endif /* WITH_QEMU */
#endif /* WITH_QEMU || WITH_LXC */
#endif /* __QEMUD_BRIDGE_H__ */

View File

@ -11,10 +11,6 @@
#ifndef __VIR_CONF_H__
#define __VIR_CONF_H__
#ifdef __cplusplus
extern "C" {
#endif
/**
* virConfType:
* one of the possible type for a value from the configuration file
@ -93,7 +89,4 @@ int __virConfWriteMem (char *memory,
#define virConfWriteFile(f,c) __virConfWriteFile((f),(c))
#define virConfWriteMem(m,l,c) __virConfWriteMem((m),(l),(c))
#ifdef __cplusplus
}
#endif
#endif /* __VIR_CONF_H__ */

View File

@ -25,16 +25,8 @@
#ifndef __MINGW32__
#ifdef __cplusplus
extern "C" {
#endif
int vshRunConsole(const char *tty);
#ifdef __cplusplus
}
#endif
#endif /* !__MINGW32__ */
#endif /* __VIR_CONSOLE_H__ */

View File

@ -13,10 +13,6 @@
#include <signal.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* List of registered drivers numbers
*/
@ -611,7 +607,4 @@ int virRegisterStorageDriver(virStorageDriverPtr);
int virRegisterStateDriver(virStateDriverPtr);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __VIR_DRIVER_H__ */

View File

@ -12,10 +12,6 @@
#ifndef __VIR_HASH_H__
#define __VIR_HASH_H__
#ifdef __cplusplus
extern "C" {
#endif
/*
* The hash table.
*/
@ -90,7 +86,4 @@ int virHashForEach(virHashTablePtr table, virHashIterator iter, const void *data
int virHashRemoveSet(virHashTablePtr table, virHashSearcher iter, virHashDeallocator f, const void *data);
void *virHashSearch(virHashTablePtr table, virHashSearcher iter, const void *data);
#ifdef __cplusplus
}
#endif
#endif /* ! __VIR_HASH_H__ */

View File

@ -38,10 +38,6 @@
#include "libvirt/virterror.h"
#include "driver.h"
#ifdef __cplusplus
extern "C" {
#endif
/* On architectures which lack these limits, define them (ie. Cygwin).
* Note that the libvirt code should be robust enough to handle the
* case where actual value is longer than these limits (eg. by setting
@ -366,7 +362,4 @@ int __virDomainMigratePrepare (virConnectPtr dconn, char **cookie, int *cookiele
int __virDomainMigratePerform (virDomainPtr domain, const char *cookie, int cookielen, const char *uri, unsigned long flags, const char *dname, unsigned long bandwidth);
virDomainPtr __virDomainMigrateFinish (virConnectPtr dconn, const char *dname, const char *cookie, int cookielen, const char *uri, unsigned long flags);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __VIR_INTERNAL_H__ */

View File

@ -36,17 +36,26 @@
#include "uuid.h"
#include "util.h"
#ifdef WITH_TEST
#include "test.h"
#endif
#ifdef WITH_XEN
#include "xen_unified.h"
#endif
#ifdef WITH_REMOTE
#include "remote_internal.h"
#endif
#ifdef WITH_QEMU
#include "qemu_driver.h"
#include "storage_driver.h"
#endif
#ifdef WITH_OPENVZ
#include "openvz_driver.h"
#endif
#ifdef WITH_LXC
#include "lxc_driver.h"
#endif
#include "storage_driver.h"
/*
* TODO:
@ -273,23 +282,23 @@ virInitialize(void)
#ifdef WITH_TEST
if (testRegister() == -1) return -1;
#endif
#ifdef WITH_QEMU
if (qemudRegister() == -1) return -1;
#endif
#ifdef WITH_XEN
if (xenUnifiedRegister () == -1) return -1;
#endif
#ifdef WITH_LIBVIRTD
#ifdef WITH_QEMU
if (qemudRegister() == -1) return -1;
#endif
#ifdef WITH_OPENVZ
if (openvzRegister() == -1) return -1;
#endif
#ifdef WITH_LXC
if (lxcRegister() == -1) return -1;
#endif
#ifdef WITH_LIBVIRTD
if (storageRegister() == -1) return -1;
#endif
#ifdef WITH_REMOTE
if (remoteRegister () == -1) return -1;
#endif
#endif
return(0);

View File

@ -25,8 +25,6 @@
/* includes */
#include <config.h>
#ifdef WITH_LXC
#include <sys/utsname.h>
#include "lxc_conf.h"
@ -111,4 +109,3 @@ no_memory:
}
#endif /* WITH_LXC */

View File

@ -26,8 +26,6 @@
#include <config.h>
#ifdef WITH_LXC
#include "internal.h"
#include "domain_conf.h"
#include "capabilities.h"
@ -52,6 +50,5 @@ void lxcError(virConnectPtr conn,
int code, const char *fmt, ...)
ATTRIBUTE_FORMAT(printf,4,5);
#endif /* WITH_LXC */
#endif /* LXC_CONF_H */

View File

@ -23,8 +23,6 @@
#include <config.h>
#ifdef WITH_LXC
#include <fcntl.h>
#include <limits.h>
#include <stdlib.h>
@ -406,4 +404,3 @@ int lxcContainerAvailable(int features)
return 0;
}
#endif /* WITH_LXC */

View File

@ -26,8 +26,6 @@
#include "lxc_conf.h"
#ifdef WITH_LXC
enum {
LXC_CONTAINER_FEATURE_NET = (1 << 0),
};
@ -42,6 +40,4 @@ int lxcContainerStart(virDomainDefPtr def,
int lxcContainerAvailable(int features);
#endif /* LXC_DRIVER_H */
#endif /* LXC_CONTAINER_H */

View File

@ -23,8 +23,6 @@
#include <config.h>
#ifdef WITH_LXC
#include <fcntl.h>
#include <sched.h>
#include <sys/utsname.h>
@ -1112,5 +1110,3 @@ int lxcRegister(void)
virRegisterStateDriver(&lxcStateDriver);
return 0;
}
#endif /* WITH_LXC */

View File

@ -26,11 +26,7 @@
#include <config.h>
#ifdef WITH_LXC
/* Function declarations */
int lxcRegister(void);
#endif /* WITH_LXC */
#endif /* LXC_DRIVER_H */

View File

@ -26,14 +26,6 @@
#include "libvirt/libvirt.h"
#ifdef __cplusplus
extern "C" {
#endif
int virNodeInfoPopulate(virConnectPtr conn, virNodeInfoPtr nodeinfo);
#ifdef __cplusplus
}
#endif
#endif /* __VIR_NODEINFO_H__*/

View File

@ -25,8 +25,6 @@
*
*/
#ifdef WITH_OPENVZ
#include <config.h>
#include <stdio.h>
@ -826,4 +824,3 @@ int openvzAssignUUIDs(void)
return 0;
}
#endif

View File

@ -25,8 +25,6 @@
*
*/
#ifdef WITH_OPENVZ
#include <config.h>
#include <sys/types.h>
@ -1015,4 +1013,3 @@ int openvzRegister(void) {
return 0;
}
#endif /* WITH_OPENVZ */

View File

@ -8,8 +8,6 @@
* Daniel Veillard <veillard@redhat.com>
*/
#ifdef WITH_XEN
#include <config.h>
#include <stdio.h>
@ -1097,4 +1095,4 @@ xenProxyDomainGetOSType(virDomainPtr domain)
return(ostype);
}
#endif /* WITH_XEN */

View File

@ -14,10 +14,6 @@
#include "libvirt/libvirt.h"
#ifdef __cplusplus
extern "C" {
#endif
#define PROXY_SOCKET_PATH "/tmp/livirt_proxy_conn"
#define PROXY_PROTO_VERSION 1
@ -98,7 +94,4 @@ extern virDomainPtr xenProxyLookupByName(virConnectPtr conn,
extern char * xenProxyDomainDumpXML(virDomainPtr domain,
int flags);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __LIBVIR_PROXY_H__ */

View File

@ -23,8 +23,6 @@
#include <config.h>
#ifdef WITH_QEMU
#include <dirent.h>
#include <string.h>
#include <limits.h>
@ -1256,5 +1254,3 @@ int qemudBuildCommandLine(virConnectPtr conn,
#undef ADD_ARG_SPACE
}
#endif /* WITH_QEMU */

View File

@ -26,8 +26,6 @@
#include <config.h>
#ifdef WITH_QEMU
#include "internal.h"
#include "iptables.h"
#include "bridge.h"
@ -102,6 +100,4 @@ int qemudBuildCommandLine (virConnectPtr conn,
const char *qemudVirtTypeToString (int type);
#endif /* WITH_QEMU */
#endif /* __QEMUD_CONF_H */

View File

@ -23,8 +23,6 @@
#include <config.h>
#ifdef WITH_QEMU
#include <sys/types.h>
#include <sys/poll.h>
#include <dirent.h>
@ -3971,4 +3969,3 @@ int qemudRegister(void) {
return 0;
}
#endif /* WITH_QEMU */

View File

@ -27,12 +27,8 @@
#include <config.h>
#ifdef WITH_QEMU
#include "internal.h"
int qemudRegister(void);
#endif /* WITH_QEMU */
#endif /* QEMUD_DRIVER_H */

View File

@ -26,10 +26,6 @@
#include "libvirt/virterror.h"
#ifdef __cplusplus
extern "C" {
#endif
int remoteRegister (void);
#define LIBVIRTD_LISTEN_ADDR NULL
@ -48,7 +44,5 @@ int remoteRegister (void);
#define LIBVIRT_SERVERKEY LIBVIRT_PKI_DIR "/libvirt/private/serverkey.pem"
#define LIBVIRT_SERVERCERT LIBVIRT_PKI_DIR "/libvirt/servercert.pem"
#ifdef __cplusplus
}
#endif
#endif /* __VIR_REMOTE_INTERNAL_H__ */

View File

@ -23,8 +23,6 @@
#include <config.h>
#ifdef WITH_TEST
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
@ -32,8 +30,6 @@
#include <unistd.h>
#include <sys/stat.h>
#include "socketcompat.h"
#include "test.h"
#include "buf.h"
#include "util.h"
@ -1645,5 +1641,3 @@ testRegister(void)
return -1;
return 0;
}
#endif /* WITH_TEST */

View File

@ -26,13 +26,6 @@
#include "internal.h"
#ifdef __cplusplus
extern "C" {
#endif
int testRegister(void);
#ifdef __cplusplus
}
#endif
#endif /* __VIR_TEST_INTERNAL_H__ */

View File

@ -11,8 +11,6 @@
#include <config.h>
#ifdef WITH_LXC
#include <string.h>
#include "veth.h"
@ -218,4 +216,4 @@ error_out:
VIR_FREE(pid);
return rc;
}
#endif

View File

@ -8,8 +8,6 @@
* Daniel Veillard <veillard@redhat.com>
*/
#ifdef WITH_XEN
#include <config.h>
#include <stdio.h>
@ -3293,4 +3291,3 @@ xenHypervisorGetVcpuMax(virDomainPtr domain)
return maxcpu;
}
#endif /* WITH_XEN */

View File

@ -11,10 +11,6 @@
#ifndef __VIR_XEN_INTERNAL_H__
#define __VIR_XEN_INTERNAL_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "internal.h"
#include "capabilities.h"
@ -102,7 +98,5 @@ int xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn,
unsigned long long *freeMems,
int startCell,
int maxCells);
#ifdef __cplusplus
}
#endif
#endif /* __VIR_XEN_INTERNAL_H__ */

View File

@ -10,8 +10,6 @@
#include <config.h>
#ifdef WITH_XEN
/* Note:
*
* This driver provides a unified interface to the five
@ -1383,4 +1381,3 @@ xenUnifiedRegister (void)
return virRegisterDriver (&xenUnifiedDriver);
}
#endif /* WITH_XEN */

View File

@ -21,10 +21,6 @@
#include <winsock2.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
extern int xenUnifiedRegister (void);
#define XEN_UNIFIED_HYPERVISOR_OFFSET 0
@ -93,7 +89,6 @@ struct xenUnifiedDriver {
*/
struct _xenUnifiedPrivate {
virCapsPtr caps;
#ifdef WITH_XEN
int handle; /* Xen hypervisor handle */
int xendConfigVersion; /* XenD config version */
@ -107,7 +102,6 @@ struct _xenUnifiedPrivate {
struct sockaddr_in addr_in; /* the inet address */
struct xs_handle *xshandle; /* handle to talk to the xenstore */
#endif /* WITH_XEN */
int proxy; /* fd of proxy. */
@ -124,8 +118,5 @@ typedef struct _xenUnifiedPrivate *xenUnifiedPrivatePtr;
int xenNbCells(virConnectPtr conn);
int xenNbCpus(virConnectPtr conn);
char *xenDomainUsedCpus(virDomainPtr dom);
#ifdef __cplusplus
}
#endif
#endif /* __VIR_XEN_UNIFIED_H__ */

View File

@ -10,7 +10,6 @@
* archive for more details.
*/
#ifdef WITH_XEN
#include <config.h>
#include <stdio.h>
@ -5549,4 +5548,3 @@ virDomainXMLDevID(virDomainPtr domain,
}
#endif /* ! PROXY */
#endif /* WITH_XEN */

View File

@ -25,10 +25,6 @@
#include "domain_conf.h"
#include "buf.h"
#ifdef __cplusplus
extern "C" {
#endif
int
xenDaemonOpen_unix(virConnectPtr conn, const char *path);

View File

@ -22,7 +22,6 @@
*
*/
#ifdef WITH_XEN
#include <config.h>
#include <dirent.h>
@ -2685,4 +2684,3 @@ xenXMDomainBlockPeek (virDomainPtr dom,
return -1;
}
#endif /* WITH_XEN */

View File

@ -8,7 +8,6 @@
* Daniel Veillard <veillard@redhat.com>
*/
#ifdef WITH_XEN
#include <config.h>
#include <stdio.h>
@ -938,5 +937,3 @@ char *xenStoreDomainGetName(virConnectPtr conn,
return xs_read(priv->xshandle, 0, prop, &len);
}
#endif /* WITH_XEN */

View File

@ -11,10 +11,6 @@
#ifndef __VIR_XS_INTERNAL_H__
#define __VIR_XS_INTERNAL_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "internal.h"
extern struct xenUnifiedDriver xenStoreDriver;
@ -57,7 +53,4 @@ char * xenStoreDomainGetDiskID(virConnectPtr conn,
char * xenStoreDomainGetName(virConnectPtr conn,
int id);
#ifdef __cplusplus
}
#endif
#endif /* __VIR_XS_INTERNAL_H__ */

View File

@ -13,11 +13,6 @@
#ifndef __VIT_TEST_UTILS_H__
#define __VIT_TEST_UTILS_H__
#ifdef __cplusplus
extern "C" {
#endif
double virtTestCountAverage(double *items,
int nitems);
@ -46,7 +41,4 @@ extern "C" {
return virtTestMain(argc,argv, func); \
}
#ifdef __cplusplus
}
#endif
#endif /* __VIT_TEST_UTILS_H__ */