]> xenbits.xensource.com Git - libvirt.git/commitdiff
Wed Dec 5 13:48:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 5 Dec 2007 13:56:22 +0000 (13:56 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 5 Dec 2007 13:56:22 +0000 (13:56 +0000)
        * 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.

25 files changed:
ChangeLog
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

index f6227d990be10aa52e43226383b4acfad8feb37f..578d9e3326cbc63055dbd748a6b34fffe91a4390 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+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.
index 9969c803233f97cb56c366c70048f841979b04d0..54dca79ffd0b0e86e99334a2d052bd96aeae7fb9 100644 (file)
@@ -10,8 +10,8 @@
  */
 
 #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"
 
index d7f43c27733ef40a55f56bdb5f0bfda8f8917ecc..ef5fa68199c2b58589b72810021f4915d0a8eeeb 100644 (file)
@@ -7,8 +7,8 @@
  */
 
 #include <Python.h>
-#include <libvirt/libvirt.h>
-#include <libvirt/virterror.h>
+#include "libvirt/libvirt.h"
+#include "libvirt/virterror.h"
 
 #ifdef __GNUC__
 #ifdef ATTRIBUTE_UNUSED
index f88ed42cb8d5cba292c44b11291f4b20b647a1b4..b983e547861e1da77594e73456f6fb70b505f50c 100644 (file)
@@ -50,7 +50,7 @@
 #include <fnmatch.h>
 #include <grp.h>
 
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
 
 #include "internal.h"
 #include "../src/internal.h"
index 047cae73c9b061f4b56c7e161c582431e8f7d72a..93af5104b6973b71972fb3698f3cbd9588a7eb0e 100644 (file)
@@ -45,7 +45,7 @@
 #include <ctype.h>
 #include <assert.h>
 
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
 
 #include "internal.h"
 #include "../src/internal.h"
index 3fc111634ffda37ae6f8a8b26e5fcbde226641fe..0ef32a0b51be44162c3966dadbfeb298d0033327 100644 (file)
@@ -6,16 +6,22 @@
 #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)
@@ -52,15 +48,12 @@ extern "C" {
 #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:
  *
index c9f8536c565e652eb0be991906844a3ca8b90ecc..88491f7ae3e0e5c1b8aa57f85518892ced2a5c00 100644 (file)
@@ -45,7 +45,7 @@
 #include <libxml/xpath.h>
 #include <libxml/uri.h>
 
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
 
 #include "openvz_driver.h"
 #include "openvz_conf.h"
index aa554f2f4d15330c703472c00c0544806da50acd..7c4a46d8443a7d79fb3c9aaa6ce8657721bf7b7a 100644 (file)
@@ -52,7 +52,7 @@
 #include <stdio.h>
 #include <sys/wait.h>
 
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
 
 #include "openvz_driver.h"
 #include "event.h"
index fa8e48abd403ea7829bf66cf39ec714a7f4b2263..47cc790a745709175dd5364032c3ac60bfe08244 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef __LIBVIR_PROXY_H__
 #define __LIBVIR_PROXY_H__
 
-#include <libvirt/libvirt.h>
+#include "libvirt/libvirt.h"
 
 #ifdef __cplusplus
 extern "C" {
index 2635b334d4f1199a1e9832435eb33d346531756b..0c43e57dd4b689debfc9a9818a0728030c215b3f 100644 (file)
@@ -42,7 +42,7 @@
 #include <libxml/xpath.h>
 #include <libxml/uri.h>
 
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
 
 #include "qemu_conf.h"
 #include "uuid.h"
index 0be71a56312d3fd19b0644176a4d11e3146603c2..4cdf0b4dfeb5f7727e9cae498c430b202bbc44d9 100644 (file)
@@ -49,7 +49,7 @@
 #include <sys/wait.h>
 #include <libxml/uri.h>
 
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
 
 #include "event.h"
 #include "buf.h"
index da4b0b0f824db028c0eb9b05cda37bb60acfc545..ce8f400dce1b5c602df1f759fea916867c073162 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef __VIR_REMOTE_INTERNAL_H__
 #define __VIR_REMOTE_INTERNAL_H__
 
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
 
 #ifdef __cplusplus
 extern "C" {
index b542c27786f66812af21a9f42aaa8091ae0d81ad..a20ee22fae7eb78644d31172c65c0260832cd7ef 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef __VIR_TEST_INTERNAL_H__
 #define __VIR_TEST_INTERNAL_H__
 
-#include <libvirt/virterror.h>
+#include "libvirt/virterror.h"
 
 #ifdef __cplusplus
 extern "C" {
index 50ddcffcfb4248b50094a2eebcb91b248822b3ee..8472eb85bcd356ceb7818863599131b1d39189be 100644 (file)
 #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"
index 336b7ec8a31fdfdef2c8011466a6fb95976f37a4..c38b11d693ce2c7b1bd3caf087c9022564a57929 100644 (file)
@@ -8,6 +8,8 @@
  * Richard W.M. Jones <rjones@redhat.com>
  */
 
+#include "config.h"
+
 #ifdef WITH_XEN
 
 /* Note:
@@ -1193,15 +1195,15 @@ xenUnifiedNodeGetFreeMemory (virConnectPtr conn)
 
 /*----- 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,
index 5d5e073449c6ab20136dbcc50fbead9332653bd7..a1249aa747625d3f0d875d36b04a7a3365909012 100644 (file)
@@ -13,6 +13,9 @@
 
 #include "internal.h"
 
+#include <sys/un.h>
+#include <netinet/in.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index 7275cc3fdd35c35c3ef67e0904b12eac4386bc58..1caef11d9897449f7e694f367618601e8558ef21 100644 (file)
@@ -2,11 +2,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-
-#ifdef HAVE_SYS_SYSLIMITS_H
-#include <sys/syslimits.h>
-#endif
-
 #include <string.h>
 
 #include "testutils.h"
index 966f67c3246832035cdb754c2aaa62c41a2a5b91..95b4679ec87c713c1b0516e118d3acee391aa176 100644 (file)
@@ -8,15 +8,11 @@
 #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;
index a448ee244fea913f019dc597ad6a3e8620af9a3c..c42e6fb68dac8860be86302827a12c6505c0fc68 100644 (file)
@@ -8,15 +8,11 @@
 #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;
index 6a6a1d22d5b1b21505e3aa4f40318a41ac9aa72f..246e3bbd70f070f7116452f6a6d312a5758620e3 100644 (file)
@@ -1,7 +1,7 @@
 #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,
index 3744801c38935bdaa938a0721e4f32142afb2cae..6586e92a69c76dc7bbc76c20e149a28de967e7c2 100644 (file)
@@ -3,15 +3,12 @@
 #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;
index b58a4e3556516d734f946fbc2ee7df3763542b45..fd6dcbb2a338db219434d977625dfbcb9dbee184 100644 (file)
@@ -3,15 +3,10 @@
 #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;
index bbf5976e2f9ae5d4d04610a7d2702e142e1e142e..dd1c386c82cd3e93d7fd2ce3f8e376318bf08334 100644 (file)
@@ -2,18 +2,13 @@
 
 #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;
index 4ed9eb111635809ed2c6eb3dc531bc019c11ac8c..d66b66015cbc18d237e562ed2e9b1869cb566f66 100644 (file)
 #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;
index 1f37b21cd500212e39f7103a8ed23add98b69a0d..2d18e608b2e6c375e6c9a66e539efdaf867c40e6 100644 (file)
@@ -2,21 +2,16 @@
 #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;