# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 15788ab9fce254079bb449a62a8c859609ac30b3
# Parent 4e0f2272fbcd156708a3d5d046713ca8cc539da2
Define __XEN_TOOLS__ when building tools. Use this to
automatically build against latest Xen interface version,
and to specifically define GET_XEN_GUEST_HANDLE().
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
diff -r 4e0f2272fbcd -r 15788ab9fce2 tools/Rules.mk
--- a/tools/Rules.mk Thu Apr 27 14:03:22 2006 +0100
+++ b/tools/Rules.mk Thu Apr 27 14:06:41 2006 +0100
@@ -12,7 +12,7 @@ XEN_LIBXENSTAT = $(XEN_ROOT)/tools/x
X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
-CFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030201
+CFLAGS += -D__XEN_TOOLS__
%.opic: %.c
$(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
diff -r 4e0f2272fbcd -r 15788ab9fce2 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h Thu Apr 27 14:03:22 2006 +0100
+++ b/xen/include/public/arch-ia64.h Thu Apr 27 14:06:41 2006 +0100
@@ -13,7 +13,9 @@
#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
#define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
#define SET_XEN_GUEST_HANDLE(hnd, val) do { (hnd).p = val; } while (0)
+#ifdef __XEN_TOOLS__
#define GET_XEN_GUEST_HANDLE(val, hnd) do { val = (hnd).p; } while (0)
+#endif
#ifndef __ASSEMBLY__
/* Guest handles for primitive C types. */
diff -r 4e0f2272fbcd -r 15788ab9fce2 xen/include/public/arch-x86_32.h
--- a/xen/include/public/arch-x86_32.h Thu Apr 27 14:03:22 2006 +0100
+++ b/xen/include/public/arch-x86_32.h Thu Apr 27 14:06:41 2006 +0100
@@ -15,7 +15,9 @@
#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
#define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
#define SET_XEN_GUEST_HANDLE(hnd, val) do { (hnd).p = val; } while (0)
+#ifdef __XEN_TOOLS__
#define GET_XEN_GUEST_HANDLE(val, hnd) do { val = (hnd).p; } while (0)
+#endif
#ifndef __ASSEMBLY__
/* Guest handles for primitive C types. */
diff -r 4e0f2272fbcd -r 15788ab9fce2 xen/include/public/arch-x86_64.h
--- a/xen/include/public/arch-x86_64.h Thu Apr 27 14:03:22 2006 +0100
+++ b/xen/include/public/arch-x86_64.h Thu Apr 27 14:06:41 2006 +0100
@@ -15,7 +15,9 @@
#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
#define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
#define SET_XEN_GUEST_HANDLE(hnd, val) do { (hnd).p = val; } while (0)
+#ifdef __XEN_TOOLS__
#define GET_XEN_GUEST_HANDLE(val, hnd) do { val = (hnd).p; } while (0)
+#endif
#ifndef __ASSEMBLY__
/* Guest handles for primitive C types. */
diff -r 4e0f2272fbcd -r 15788ab9fce2 xen/include/public/xen-compat.h
--- a/xen/include/public/xen-compat.h Thu Apr 27 14:03:22 2006 +0100
+++ b/xen/include/public/xen-compat.h Thu Apr 27 14:06:41 2006 +0100
@@ -11,7 +11,7 @@
#define __XEN_LATEST_INTERFACE_VERSION__ 0x00030201
-#if defined(__XEN__)
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
/* Xen is built with matching headers and implements the latest interface. */
#define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__
#elif !defined(__XEN_INTERFACE_VERSION__)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|