+Wed Dec 5 13:48:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
+
+ * python/libvir.c, python/libvirt_wrap.h, qemud/qemud.c,
+ qemud/remote.c, src/internal.h, src/openvz_conf.c,
+ src/openvz_driver.c, src/proxy_internal.h, src/qemu_conf.c,
+ src/qemu_driver.c, src/remote_internal.h, src/test.h, src/util.c,
+ src/xen_unified.c, src/xen_unified.h, tests/nodeinfotest.c,
+ tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c, tests/reconnect.c,
+ tests/sexpr2xmltest.c, tests/virshtest.c, tests/xencapstest.c,
+ tests/xmconfigtest.c, tests/xml2sexprtest.c:
+ Change #include <> to #include "" for local includes.
+ Removed many includes from src/internal.h and put them in
+ the C files which actually use them.
+ Removed <ansidecl.h> - unused.
+ Added a comment around __func__.
+ Removed a clashing redefinition of VERSION symbol.
+ All limits (PATH_MAX etc) now done in src/internal.h, so we
+ don't need to include those headers in other files.
+
Tue Dec 4 18:25:01 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Fix configure if rpcgen program is missing.
*/
#include <Python.h>
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
+#include "libvirt/libvirt.h"
+#include "libvirt/virterror.h"
#include "libvirt_wrap.h"
#include "libvirt-py.h"
*/
#include <Python.h>
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
+#include "libvirt/libvirt.h"
+#include "libvirt/virterror.h"
#ifdef __GNUC__
#ifdef ATTRIBUTE_UNUSED
#include <fnmatch.h>
#include <grp.h>
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
#include "internal.h"
#include "../src/internal.h"
#include <ctype.h>
#include <assert.h>
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
#include "internal.h"
#include "../src/internal.h"
#define __VIR_INTERNAL_H__
#include <errno.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <libxml/threads.h>
+#include <limits.h>
+
#ifdef HAVE_SYS_SYSLIMITS_H
#include <sys/syslimits.h>
#endif
+#include "hash.h"
+#include "libvirt/libvirt.h"
+#include "libvirt/virterror.h"
+#include "driver.h"
+#include <libintl.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
#define IF_NAMESIZE 16
#endif
-#include "hash.h"
-#include "libvirt/libvirt.h"
-#include "libvirt/virterror.h"
-#include "driver.h"
-#include <libintl.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#define _(str) dgettext(GETTEXT_PACKAGE, (str))
#define N_(str) dgettext(GETTEXT_PACKAGE, (str))
#define gettext_noop(str) (str)
#define STREQLEN(a,b,n) (strncmp((a),(b),(n)) == 0)
#define STRNEQLEN(a,b,n) (strncmp((a),(b),(n)) != 0)
+/* C99 uses __func__. __FUNCTION__ is legacy. */
#ifndef __GNUC__
-#define __FUNCTION__ __func__
+#define __FUNCTION__ __func__
#endif
#ifdef __GNUC__
-#ifdef HAVE_ANSIDECL_H
-#include <ansidecl.h>
-#endif
-
/**
* ATTRIBUTE_UNUSED:
*
#include <libxml/xpath.h>
#include <libxml/uri.h>
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
#include "openvz_driver.h"
#include "openvz_conf.h"
#include <stdio.h>
#include <sys/wait.h>
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
#include "openvz_driver.h"
#include "event.h"
#ifndef __LIBVIR_PROXY_H__
#define __LIBVIR_PROXY_H__
-#include <libvirt/libvirt.h>
+#include "libvirt/libvirt.h"
#ifdef __cplusplus
extern "C" {
#include <libxml/xpath.h>
#include <libxml/uri.h>
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
#include "qemu_conf.h"
#include "uuid.h"
#include <sys/wait.h>
#include <libxml/uri.h>
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
#include "event.h"
#include "buf.h"
#ifndef __VIR_REMOTE_INTERNAL_H__
#define __VIR_REMOTE_INTERNAL_H__
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
#ifdef __cplusplus
extern "C" {
#ifndef __VIR_TEST_INTERNAL_H__
#define __VIR_TEST_INTERNAL_H__
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
#ifdef __cplusplus
extern "C" {
#include <sys/stat.h>
#include <string.h>
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
-
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
+#include "internal.h"
#include "event.h"
#include "buf.h"
#include "util.h"
* Richard W.M. Jones <rjones@redhat.com>
*/
+#include "config.h"
+
#ifdef WITH_XEN
/* Note:
/*----- Register with libvirt.c, and initialise Xen drivers. -----*/
-#define VERSION ((DOM0_INTERFACE_VERSION >> 24) * 1000000 + \
- ((DOM0_INTERFACE_VERSION >> 16) & 0xFF) * 1000 + \
- (DOM0_INTERFACE_VERSION & 0xFFFF))
+#define HV_VERSION ((DOM0_INTERFACE_VERSION >> 24) * 1000000 + \
+ ((DOM0_INTERFACE_VERSION >> 16) & 0xFF) * 1000 + \
+ (DOM0_INTERFACE_VERSION & 0xFFFF))
/* The interface which we export upwards to libvirt.c. */
static virDriver xenUnifiedDriver = {
.no = VIR_DRV_XEN_UNIFIED,
.name = "Xen",
- .ver = VERSION,
+ .ver = HV_VERSION,
.open = xenUnifiedOpen,
.close = xenUnifiedClose,
.supports_feature = xenUnifiedSupportsFeature,
#include "internal.h"
+#include <sys/un.h>
+#include <netinet/in.h>
+
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
#include <stdlib.h>
-
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
-
#include <string.h>
#include "testutils.h"
#include <sys/types.h>
#include <fcntl.h>
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
-
#ifdef WITH_QEMU
+#include "internal.h"
#include "testutils.h"
#include "qemu_conf.h"
-#include "internal.h"
static char *progname;
static char *abs_top_srcdir;
#include <sys/types.h>
#include <fcntl.h>
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
-
#ifdef WITH_QEMU
+#include "internal.h"
#include "testutils.h"
#include "qemu_conf.h"
-#include "internal.h"
static char *progname;
static char *abs_top_srcdir;
#include <stdio.h>
#include <stdlib.h>
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
+#include "libvirt/libvirt.h"
+#include "libvirt/virterror.h"
#include "internal.h"
static void errorHandler(void *userData ATTRIBUTE_UNUSED,
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
-
#ifdef WITH_XEN
+
+#include "internal.h"
#include "xml.h"
#include "xend_internal.h"
#include "testutils.h"
-#include "internal.h"
static char *progname;
static char *abs_top_srcdir;
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <limits.h>
-
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
+#include "internal.h"
#include "xml.h"
#include "testutils.h"
-#include "internal.h"
static char *progname;
static char *abs_top_srcdir;
#include <stdio.h>
#include <stdlib.h>
-
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
+#include <string.h>
#ifdef WITH_XEN
-#include <string.h>
-
+#include "internal.h"
#include "xml.h"
#include "testutils.h"
-#include "internal.h"
#include "xen_internal.h"
static char *progname;
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
-
#ifdef WITH_XEN
+
+#include "internal.h"
#include "xen_unified.h"
#include "xm_internal.h"
#include "testutils.h"
-#include "internal.h"
#include "conf.h"
static char *progname;
#include "config.h"
#include <stdio.h>
-#include <string.h>
#include <stdlib.h>
-
+#include <string.h>
#include <sys/types.h>
#include <fcntl.h>
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
-
#if WITH_XEN
+#include "internal.h"
#include "xml.h"
#include "testutils.h"
-#include "internal.h"
static char *progname;
static char *abs_top_srcdir;