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.
This commit is contained in:
Richard W.M. Jones 2007-12-05 13:56:22 +00:00
parent 5682ba5921
commit 4bfdb77aae
25 changed files with 70 additions and 90 deletions

View File

@ -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.

View 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"

View 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

View 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"

View 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"

View 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
@ -30,16 +36,6 @@
#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:
*

View 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"

View 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"

View 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" {

View 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"

View 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"

View 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" {

View 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" {

View File

@ -36,11 +36,8 @@
#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"

View 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,

View File

@ -13,6 +13,9 @@
#include "internal.h"
#include <sys/un.h>
#include <netinet/in.h>
#ifdef __cplusplus
extern "C" {
#endif

View 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"

View 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;

View 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;

View 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,

View 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;

View 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;

View 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;

View File

@ -26,15 +26,12 @@
#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;

View 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;